home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1996 April / Macworld (1996-04).dmg / Shareware World / Entertainment / General / Xconq 7.0.1 / doc / PROJECTS < prev    next >
Text File  |  1995-08-23  |  118KB  |  2,975 lines

  1. PROJECT IDEAS
  2.  
  3. This list is a collection of ideas about what to change in Xconq.
  4. In general, these are new features, rather than actual bug fixes.
  5. Everything is grouped into one of several categories, although
  6. the grouping is not precise, and to find out if some idea has been
  7. already thought of, you should search this using appropriate keywords.
  8.  
  9. --Overall
  10.  
  11. Allow game to define the fate of units when a side resigns.  Default
  12. should be for nothing to happen to any unit.  Possibilities include
  13. disappearance, surrender to first unit showing up, whole side being
  14. controlled, etc.
  15. Also include policy or commands to edit the leftover images from
  16. a losing side.
  17.  
  18. Set up consistent rules for action priority.
  19. Unit action priority should be able to derive from individual extension
  20. property, a per-side vector of type priorities, a per-type property,
  21. and a per-side property.  Routine is just unit_priority(unit).
  22. Goal is to be able to have, say, allied aircraft and German ground
  23. units move together, then German aircraft and allied ground, then
  24. trains and trucks of both sides.
  25. Requirements:
  26. 1. Units of same priority should be able to be moved in a convenient
  27. order (to minimize scrolling, according to player's prefs, etc).
  28. 2. All units of a given priority must have finished movement before
  29. the next will move.  Includes delayed units.
  30.  
  31. --GDL
  32.  
  33. Define a global "side*" that is a list of all sides.
  34.  
  35. In evals, give meaning to "this" so expressions like (count <u> (this side))
  36. work.
  37.  
  38. Could restrict some tables to 15 bit integers, use top bit to repn varying
  39. value, up to 16d15+127 by doing a 4/4/7 split of bits.
  40.  
  41. Support full decimals for parms, flush the "10000" numbers and add scale
  42. factor to all numeric parms.  Scaling fixed by code, use scaling when
  43. computing effects.
  44. Ambiguity if context of decimal doesn't include scale factor (as in "define"),
  45. but could support decimals as a distinct type in GDL (as ratios instead of
  46. floats?).  c_number should convert to integer, or check validity of uses.
  47.  
  48. Error messages should include context as well as line numbers (save previous
  49. several lines, and dump next several if still reading after error).
  50. Show first 72 chars of 3 previous lines and 3 following lines.
  51.  
  52. --Types and Objects
  53.  
  54. Fix see-always to not show city occupants unless explicitly set up.
  55. (Only true of X11 interface?)
  56.  
  57. If the people in a cell change to a trusted side, or if a trusted unit
  58. enters enemy cell, allies should get view updates.
  59.  
  60. Decide who will see terrain changes in general, and weather/season
  61. effects.  Need always-seen for these things, use coverage arrays as well.
  62. Also allow for varying reliability and completeness of this.
  63.  
  64. Implement delayed views, where a unit that is out of contact with the side
  65. keeps own view data and only merges when in contact with side again.
  66.  
  67. [vision-terrain-effect to alter range depending on terrain?]
  68.  
  69. [check validity of random event list after loading]
  70.  
  71. /* (doctrine or general prefs specify what sorts of events get presented
  72.    to players) */
  73.  
  74. For small-part-of-world areas, define daylight-zone and twilight-zone(?),
  75. which default to 1/2 and 1/12 respectively.
  76.  
  77. Only certain types of units should be able to have mixed feelings, alloc
  78. loyalty objects for these.  Loyalty objects all consistent size, needed only
  79. if more than two feelings possible, else use 4-byte slot for values.
  80. u_max_loyalties, default of 0 means like a machine, no issue of loyalty.
  81. 1 means always loyal to overt side, but degree can vary.
  82. 2 means overt and "true" side, be able to do with no extra space.
  83. >2 possible, needs alloc.  Count indeps as one of sides.
  84.  
  85. Add area illumination ability so that burning wrecks and such can illuminate
  86. immediate area at night.
  87.  
  88. Add a "last-alliance-wins" scorekeeper, use with some games.
  89.  
  90. Decide when sides should be able to look at other units' hp.
  91.  
  92. Climate-related global vars should become world or area properties.
  93.  
  94. Need a way to indicate that some types are never available in a game,
  95. cache in arrays u_available[], etc, test internally, etc.
  96. Also need a per-turn test to see what is currently available.
  97.  
  98. Notify display when cover goes to/from 0 (but excessive, since coverage
  99. always cleared then restored later).
  100.  
  101. Add a controlled-by layer to world that can be distinct from people side.
  102. Control can be imposed by presence of particular units within a given
  103. range, maintained by others to a given range, with chance of reversion
  104. to people side if different from controlling side.
  105.  
  106. Use unit->origside in reporting, liberation, etc.
  107. Captured unit actually goes to origside if trusted by
  108. capturing unit's side.
  109.  
  110. Define unit feelings toward each side as pair of bytes, for/against and
  111. willingness to act on feeling.
  112.  
  113. Clarify vision rules.  The true state of the world is a set of layers.
  114. For each cell in each layer, there is an apparent value, a date for
  115. that value, possibly prev values also.  Only need bit if value always
  116. accurately known once discovered.  Elevations and features unlikely
  117. to change, but weather, units, people, material often inaccurate.
  118. May need as many view layers as actual layers, but can often merge
  119. (elevation with terrain, etc).
  120. directly_visible(side, unit)
  121. implies that unit is accurately seen.
  122. chance_to_see{,_on_movement,_on_action,_each_turn}(side, unit)
  123. if always 100%, then is equiv to directly_visible.
  124. Need parms see-xxx-always for each layer.
  125.  
  126. Define a unit->tracking slot that is a sidemask of sides that are
  127. seeing the unit move around.  (Unit property "trk".)
  128. #define side_tracks_unit(side,unit) (unit->tracking&side_bit(side)).
  129. Define u_track_chance, defaults to 0.
  130. Define u_lose_track_chance, evaluate once/move, once/turn.
  131. If unit being tracked, then updates about unit state go to all
  132. tracking sides.
  133. Track bit would always be set for own units.
  134.  
  135. Implement storms as very-high-density cloud (>100%?).  Storms cause
  136. accidents and attrition.
  137.  
  138. Impl constant elevations and temps that don't need a whole layer.
  139. Detect by seeing min == max of terrain types present (and no chance
  140. of terrain changes - test this in general).
  141.  
  142. Allow some moves to use random mp, be able to specify +/- amounts.
  143. This is mp (and acp?) consumption only, does not affect validity of action.
  144. ut_mp_extra?
  145.  
  146. Define a notion of hp for bord/conn types, allows for interdiction
  147. and repair.
  148.  
  149. Side library should be able to allow multiple usages of some members.
  150. If possible now by listing a set of side properties several times,
  151. document as capability.
  152.  
  153. Define a hallucination chance for some utypes:
  154. (sp-)looks-like u1 u2 -> n% is chance that u1 appears to be a u2
  155. and is recorded as such in a view.
  156. Note that code should ensure that only info about image is displayed
  157. rather than hallucination.
  158.  
  159. Use a slot (which?) to indicate variation radius of actual reinforcement
  160. position around  given xy.  Default of zero requires to be on actual xy.
  161.  
  162. Implement ZOC as a layer if any ZOC ranges > 1.
  163.  
  164. Add a new layer coveralt to indicate the lowest altitude visible
  165. to any unit on the side.  Adjust along with basic coverage.
  166.  
  167. Add a "facing" bitmask that indicates the directions that a unit is
  168. "facing", or can operate in, add effects of facing vs non-facing.
  169. Come up with a display for this.
  170.  
  171. Events can have causes that they should be tied to, can use to
  172. enhance displays etc.
  173.  
  174. Add a (x (symbol <sym>)) to units that can be used to write a symbolic
  175. ref to unit when saving.
  176.  
  177. Maintain an in-supply bit for units.
  178.  
  179. Add chance that incomplete units will lose cp (eliminating if cp == 1),
  180. call it incomplete-accident-chance.
  181.  
  182. To decide about control, see if any units cannot always be controlled
  183. directly, then for those compute the max radius that controlling units
  184. can be in.  If > 1, should define a layer, otherwise check directly
  185. when need to know.
  186.  
  187. Add a commander property to units, control of units can recurse through
  188. commanders, so unit not under direct control can be under control if
  189. commander is in control range.
  190.  
  191. Some unit types should be unwilling to break a treaty.
  192. (In some games,)
  193. Should humans have to declare war explicitly?
  194. DoW may not be possible or meaningful in some games...
  195. DoW is agreement by single player doing the declaration, terms are to
  196. treat side as enemy (doctrine), and to hit other side (how often?),
  197. could demand a surrender of some sort.
  198. DoW must be public.
  199. Up to other sides how to respond.
  200. Peace treaty includes terms to nullify DoW.
  201. In general, terms should be able to include refs to other agreements.
  202. DoW can always be rescinded by player alone, make it have morale
  203. consequences?
  204.  
  205. LOS always sees straight overhead perfectly, so calculations really
  206. figure how how low to the ground is visible at any point.
  207.  
  208. Could add a bit vector to spottable units indicating which sides
  209. are tracking.
  210.  
  211. For each unit type, add a property that indicates fate of unit when
  212. side leaves the game - change side, disappear, no change.
  213.  
  214. @deffn Table @code{people-sabotage-rate??} u m -> .01hp
  215. This table is the attrition rate of a unit in the open in
  216. a cell with people on a hostile [define] side.
  217. @end deffn
  218.  
  219. DEF_UPROP_I("lockon-chance", u_lockon_chance,
  220.     "chance that unit remains seen when no longer covered",
  221.     lockonchance, 0, 0, 100)
  222. @deffn UnitTypeProperty @code{lockon-chance} n%
  223. This property is the chance that once seen, a unit will continue to be seen
  224. while it is being covered.
  225. Defaults to @code{0}.
  226. @end deffn
  227.  
  228. DEF_UPROP_I("storage", u_storage,
  229.     "space for materials shared by all types",
  230.     storage, 0, 0, 9999)
  231. DEF_UM_TABLE("material-size-in-unit", um_size,
  232.     "how much space one unit of a material requires in a unit",
  233.     umsize, constumsize, 0, 1, 9999)
  234. @deffn UnitTypeProperty @code{storage} n
  235. This property is a unit's generic space for materials of any type.
  236. Defaults to @code{0}.
  237. @end deffn
  238. @deffn Table @code{material-size-in-unit} u m -> n
  239. This table is the amount by which the given material counts against
  240. the unit's storage space.
  241. Defaults to @code{1}.
  242. @end deffn
  243.  
  244. DEF_UT_TABLE("capacity-negation", ut_capacity_neg,
  245.     "true if the unit negates capacity of connections of the terrain type",
  246.     utcapacityneg, constutcapacityneg, 0, 0, 1)
  247. [, but some unit types negate the capacity of connections.]
  248. @deffn Table @code{capacity-negation} u t -> t/f
  249. This table is @code{true} if when @var{u} is in the open in a cell
  250. that includes connections of type @var{t},
  251. those connections have no capacity for units.
  252. Defaults to @code{false}.
  253. @end deffn
  254.  
  255. Implement (or stub) basic goal tests.
  256.  
  257. Implement doctrine locking.
  258.  
  259. Terrain types should have a precedence determining which conn/border types
  260. override each other's effects (right now any conn overrides any border).
  261. Should be a property of ttypes.
  262.  
  263. Side relations could be expressed as a bit vector of what will happen
  264. in various situations.  "wake up if approached", "allow entry", "exchange
  265. view info", etc.  Particular relationships such as trust and control
  266. become particular bit vectors then. (or could do as defcon levels?)
  267.  
  268. Need a way to have an OB with lots of units, followed by refs to
  269. particular units and modified properties, and read both without
  270. creating any useless units.
  271.  
  272. @deffn SideProperty @code{respect-neutrality} t/f
  273. @end deffn
  274.  
  275. DEF_KWD("real-timeout", K_REAL_TIMEOUT, 0)
  276.  
  277. @deffn SideProperty @code{real-timeout} seconds
  278. This property is the number of (real) seconds to wait before declaring the
  279. side to be finished with this turn.
  280. Defaults to @code{-1}, which waits forever.
  281. @end deffn
  282.  
  283. @deffn SideProperty @code{task-limit}
  284. This property is the maximum number of tasks a unit is allowed to stack up.
  285. @end deffn
  286.  
  287. @deffn DoctrineProperty @code{avoid-bad-terrain} n%
  288. This property is the probability that the unit will not enter
  289. unhealthy terrain, even if it delays meeting goals.
  290. Unhealthy means higher attrition and accident probs, materials
  291. consumed faster than replaced, slower movement.
  292. Defaults to @code{0}.
  293. @end deffn
  294.  
  295. @deffn DoctrineProperty @code{repair-at} n%
  296. This property indicates that when the unit's hp is at @var{n%} of max,
  297. make a plan to repair.
  298. Defaults to @code{50}.
  299. @end deffn
  300.  
  301. @deffn DoctrineProperty @code{resupply-at} n%
  302. This property indicates that when the level of a
  303. operationally-consumed material is at @var{n%}
  304. of capacity, try to resupply.
  305. Defaults to @code{50}.
  306. @end deffn
  307.  
  308. @deffn DoctrineProperty @code{rearm-at} n%
  309. This property indicates that when the level of a
  310. combat-consumed material is at @var{n%}
  311. of capacity, try to resupply.
  312. Defaults to @code{50}.
  313. @end deffn
  314.  
  315. --Setup
  316.  
  317. Be able to expand country borders by building or occupying outside original
  318. country.
  319. ut_add_people_chance n%
  320. ut_add_people_adj_chance n%
  321.  
  322. Decide if/how country growth and initial strength should interact.
  323.  
  324. When opening a game module, add its directory to the list of directories
  325. to search for included modules.
  326.  
  327. Assign numbers to numbered units after all are read in.  If some instances
  328. of the type are already numbered, start numbering after highest read in.
  329.  
  330. Add a command-line option to interpret forms supplied on the command line.
  331. Do these after all else read and interpreted and variants done.
  332. Allow both pre-load and post-load (default) forms.
  333.  
  334. Each side should be able to get different instructions.
  335. Per-side instructions should not be accessible to other sides.
  336.  
  337. Should use elevation diffs to decide about sloping-type terrain.
  338. Add to basic percentile algorithm.
  339.  
  340. Add a "spur" phase to road gen that connects to nearest road.
  341.  
  342. Add a chance for roads that just cross the area from one edge to
  343. another.
  344.  
  345. If a next dir for a road has a possibility to connect to a unit
  346. of a type that roads connect to, choose the dir to that unit over
  347. any open terrain direction.
  348.  
  349. Roads should be able to run in non-closer dirs for a small number
  350. of steps.  Should also look ahead to pick overall most favorable
  351. routing.
  352.  
  353. Player mix test should be allowable_player_mix(assignmentindex),
  354. allows "scapegoating" a particular player if failed - gives
  355. a starting place for interface to fix.
  356.  
  357. Define parms for variability of initial materials using variation
  358. on fractal percentile synth method.
  359.  
  360. Liquid adjacent terrain types should always even out to same elevation
  361. (highest or average of all the competing elevations?)
  362. Flooding is always instantaneous if ttypes changed by a unit.
  363. Non-liquid border might or might not be a dike.
  364.  
  365. Add density of occupants of indep units already placed.  Specify for
  366. both units that have to be occs and others that don't.
  367.  
  368. Need a way to coordinate all name gen for a single side -
  369. "foo" -> Fooland, Fooard, Fooards, Fooish"  Could also decide colors and
  370. emblem randomly, but wouldn't need to coordinate.
  371. Specify just *one* side name generator, extensions added in a standard
  372. way by an nlang.c routine.
  373. Predefine nonterminals side-name, side-noun, etc in side-namer grammar.
  374.  
  375. Add "earthlike" generator that borrows code, but is completely wired
  376. to do Earthlike stuff, including a semi-wired set of terrain types
  377. (use extensions to recognize by attributes rather than position,
  378. so that river deltas can be flat and swampy indep of how terrain type
  379. fits with others in a game design).
  380. Use tectonic code at some scales, erosion at others.
  381. Could base calcs on sphere, translate to world grid when done.
  382. Base on all real dimensions, so alt ranges wired.
  383. Parameters are area size/world.circumference for the scale
  384. (assume 100 km/cell if weird circumference),
  385. latitude of area, range of elevations (0 - 10000 meters),
  386. distance from coast (at center of area, allows specifying distance such that
  387. area can be 3/4 land, etc), average temp, average rainfall.
  388. For tectonics, use layers for plate num, move dir, and elevation.
  389. For small-scale, make random ridge/high point, erode down to lowest
  390. or to coast.
  391.  
  392. Add recorded events that get played when their scheduled time
  393. arrives, so that a city could revolt or disappear at a preset time.
  394. Playing scheduled events should happen after acp/mp calc, but before
  395. players actually get to move.
  396.  
  397. Add synth method for secret scorekeeper goals.
  398.  
  399. Use password to match up players when restoring into a different set
  400. of displays.  If no password, then will just accept a different
  401. assignment, perhaps warn for cmdline setup, flag in dialog boxes.
  402.  
  403. Any terrain-based variation, such as temperature, should check
  404. if need to represent varying values over area, don't need to
  405. alloc layer if not, *but* may need to quickly synth layer if
  406. terrain is added that *does* allow variations.
  407.  
  408. Should be able to conceal the identity of side until first
  409. encountered (still display progress in turn, helpful to play).
  410. Also not be able to send messages to unknown sides, though
  411. broadcast should still work.
  412.  
  413. In percentile terrain, map raw to final elevation more smoothly,
  414. computing min/max raw and final, stretching raw range to cover
  415. final range uniformly.
  416.  
  417. When making units appear, do only units in open directly, then
  418. occupants recursively once transports have appeared.
  419. Similarly for disappearance, but in reverse order.
  420.  
  421. Add this?  What is it supposed to mean?
  422. DEF_UU_TABLE("can-command", uu_can_command,
  423.     "true if the type can give orders to the other type",
  424.     uucancommand, constcancommand, 0, 0, 1)
  425.  
  426. --Actions
  427.  
  428. Add tables material-to-add-terrain, material-to-remove-terrain
  429. (examples are cement to make road, fill material to remove ditch or gully).
  430.  
  431. Define action "influence" that is like proposed "charm" but more
  432. general.
  433.  
  434. Allow the construction of bases even when it would be necessary
  435. to bring all units stacked in the cell inside the incomplete base,
  436. in order to make sufficient room.
  437. Entries should be automatic and free.
  438.  
  439. Add a uu_acp_for_pursuit to give a bonus if the victim is retreating.
  440.  
  441. Implement acp_for_retreat.  For each direction away from the attacker,
  442. see if (acp_for_retreat + acp) * speed > mp needed to enter cell.
  443. Do for each dir, pick workable.  But first try to retreat into transports
  444. if possible.
  445.  
  446. Add a separate chance for defender to capture attacker upon counterattack.
  447.  
  448. Add a material cost um_material_per_<type> and prerequisite
  449. um_material_to_<xxx> for all actions.
  450.  
  451. Generalized notion of fire interdiction would be useful, could subsume
  452. effects of jammers and suchlike, also if firing is used to represent
  453. aircraft raids, need a way to define interceptors that can reduce
  454. the effectiveness of the raid and the amount of aircraft material
  455. available.
  456.  
  457. To do < 1 cell/turn speeds, available acp should translate to
  458. occasional ability to move.
  459.  
  460. Define material-theft-per-contact(u1, u2, r) -> n in combat,
  461. material-loss-per-hit(u1, u2, r) -> n which is material completely lost.
  462. Some could be "resorbed" by terrain?
  463.  
  464. Some occ types could protect by intensifying counterattack.
  465.  
  466. Chance to surrender should be higher if damaged.
  467.  
  468. A mobile unit should be considered surrounded or cornered if adjacent
  469. cells are either impassable or occupied by unfriendlies.  Also look for
  470. impassable borders and passable connections.
  471.  
  472. Occupants of captured units might get to stay and not change side
  473. if friendliness-to-enter allows it (?).
  474.  
  475. Detonation's effects should depend on altitude of detonating unit -
  476. compute the "actual" 3d distance.
  477.  
  478. Define effects of altitude differences on all unit interactions.
  479.  
  480. Damage to multi-part units could be done by detaching wrecked-type
  481. instead of damaging all parts equally.  Do only if wrecked-type
  482. has appropriate sizes.  Only applies if wrecked-type has equal num
  483. parts to original type.
  484.  
  485. Could do multi-cell move actions as repn of hex entry until
  486. anything happens that requires a decision - blockage, etc.
  487. example: acp = 1, mp/acp = 10, allows single move of up to 10 hexes.
  488.  
  489. If a side wins a battle, then side's units involved should gain affinity
  490. for side, lose fear of other side.
  491. On losing side, units lose affinity for own side and increase fear of
  492. winning side.  Nonparticipants also affected, but less so.
  493. Affinity increases by positive acts, fear increases by negative acts.
  494. Betrayals should be detectable, have large effect.
  495. Need some implicit agreements about defense of units on a side,
  496. that players should not violate.
  497.  
  498. Side action limit should be a distinct value, decremented only for "manual"
  499. activity by player (first action after waiting for input?).
  500.  
  501. Add a "coordination" action that adds other units to a unit's attack,
  502. with multiplied effect.  Attack action has to look at each coordinating
  503. unit, add effect if able to do so, and take away acp for coordinating
  504. units also.
  505.  
  506. For variable-commitment combat, attacker effectively sets m% commitment
  507. for self, desires n% from defender.  Defender then chooses between n1-n2%
  508. commitment, where limits set by unit types and m%.
  509. Possible reactions also limited by commitment - defender could disengage
  510. at <10% commitment, say, is otherwise stuck in the battle.
  511. Reactions are counterattack, surrender, withdraw, do nothing special,
  512. these are (mostly) indep of damage.
  513.  
  514. Commitments default to zero.  If can be nonzero, create battle objects.
  515.  
  516. If defender counterattacks, then might exchange attacker/defender
  517. in battle, so now defender can decide commit/withdraw.
  518.  
  519. Response to capture attempt might be to hit capturing unit?
  520. Capture after combat is really a side effect where a unit surrenders
  521. (implies attacking unit might end up doing the surrendering!).
  522.  
  523. Add loss of material as consequence of combat.
  524. @deffn Table @code{theft-chance-per-attack??} u1 u2 -> n%
  525. @end deffn
  526. @deffn Table @code{stealable-material??} u m -> n
  527. @end deffn
  528. @deffn Table @code{loss-per-attack??} u1 u2 -> n%
  529. @end deffn
  530.  
  531. Add variable commitment and then constrain it:
  532. @deffn Table @code{attack-commit-min??} u1 u2 -> n%
  533. @end deffn
  534. @deffn Table @code{defend-commit-min??} u1 u2 -> n%
  535. These tables are the minimum limits on the initial commitment to a battle.
  536. Defaults to @code{0}.
  537. @end deffn
  538.  
  539. @deffn Table @code{attack-commit-max??} u1 u2 -> n%
  540. @end deffn
  541. @deffn Table @code{defend-commit-max??} u1 u2 -> n%
  542. These tables are the maximum limits on the initial commitment to a battle.
  543. Defaults to @code{100}.
  544. @end deffn
  545.  
  546. @deffn Table @code{attack-commit-up-max??} u1 u2 -> n%
  547. @end deffn
  548. @deffn Table @code{defend-commit-up-max??} u1 u2 -> n%
  549. @end deffn
  550. @deffn Table @code{attack-commit-down-max??} u1 u2 -> n%
  551. @end deffn
  552. @deffn Table @code{defend-commit-down-max??} u1 u2 -> n%
  553. These tables are the maximum limits on the change to commitment to a battle.
  554. Defaults to @code{100}.
  555. @end deffn
  556.  
  557. cxp affects both attack and defense abilities, should define
  558. uu_cxp_{attack,defend}_effect.
  559.  
  560. Be able to control whether occupants can be attacked directly.
  561.  
  562. [need general defns for who moves and when during combat rounds]
  563. [could potentiall acquire additional acp if move is discretionary,
  564. also get a level of flexibility about future commitment]
  565.  
  566. [need combat's effect on tooling? uu_tp_hit_effect, can be positive
  567. or negative (being hit helps recruiit soldiers)
  568. just hit tp randomly as percentage of hp]
  569.  
  570. @c @deffn Table @code{cxp-hit-plus-max} u1 u2 -> n%
  571. @c This table is the maximum hit modifier for attacker unit.
  572. @c Defaults to @code{0}.
  573. @c @end deffn
  574. @c 
  575. @c @deffn Table @code{cxp-hit-minus-max} u1 u2 -> n%
  576. @c This table is the maximum hit modifier for defender unit.
  577. @c Defaults to @code{0}.
  578. @c The actual hit probability equals the basic hit probability, plus
  579. @c @code{experience-hit-plus-max} times fractional experience (i.e.
  580. @c experience divided by maximum experience) of the attacking unit, minus 
  581. @c @code{experience-hit-minus-max} times fractional experience of the
  582. @c defending unit.
  583. @c @end deffn
  584.  
  585. DEF_VAR_I("actions-are-buffered", g_actions_buffered, set_g_actions_buffered,
  586.     "",
  587.     gactionsbuffered, 0, 0, 1)
  588.  
  589. @deffn GlobalVariable @code{actions-are-buffered} t/f
  590. This variable is @code{true} if all the units of the same priority
  591. must specify their actions first and then execute
  592. them all at once,
  593. rather than deciding and executing before the next unit gets to act.
  594. Defaults to @code{false}.
  595. @end deffn
  596.  
  597. DEF_UU_TABLE("material-cxp-effect", uu_material_cxp_effect,
  598.     "effect of combat experience on material usage in combat",
  599.     uumaterialcxp, constuumaterialcxp, 0, 100, 9999)
  600. @deffn Table @code{material-cxp-effect} u1 u2 -> n
  601. @end deffn
  602.  
  603. DEF_UU_TABLE("attack-elevation-effect", uu_attack_elev_effect,
  604.     "",
  605.     uuattackeleveff, constuuattackeleveff, 0, 100, 9999)
  606. @deffn Table @code{attack-elevation-effect} n
  607. Defaults to @code{100}.
  608. @end deffn
  609.  
  610. DEF_UU_TABLE("friendly-hit-chance", uu_friend_hit,
  611.     "base chance for a type of unit to hit a unit on a friendly side",
  612.     uufriendhit, constuufriendhit, 0, 0, 100)
  613. @deffn Table @code{friendly-hit-chance} u1 u2 -> n%
  614. This table is the chance that a unit @var{u2} on the attacker's side will
  615. be hit accidentally during an @code{overrun} or @code{fire-into}
  616. action.
  617. Defaults to @code{0}.
  618. @end deffn
  619.  
  620. DEF_UU_TABLE("ambush-chance", uu_ambush,
  621.     "chance that a unit will be able to attack by surprise",
  622.     uuambush, constuuambush, 0, 0, 100)
  623. @deffn Table @code{ambush-chance} u1 u2 -> n%
  624. If @var{u1} attempts to move into a cell containing @var{u2},
  625. then a) if can't co-occupy, this table is the chance that @var{u1}
  626. gets a chance to attack at improved odds(?), or if b) if can
  627. co-occupy, then @var{u1} will enter the cell, then be attacked
  628. as in a).  The ambusher's plan can flag whether the unit
  629. will take ambush opportunities or not.
  630. @end deffn
  631.  
  632. DEF_UT_TABLE("mp-to-ascend", ut_mp_to_ascend,
  633.     "mp needed to increase elevation or altitude",
  634.     utmptoascend, constutmptoascend, -1, 0, 9999)
  635.  
  636. DEF_UT_TABLE("mp-to-descend", ut_mp_to_descend,
  637.     "mp needed to reduce elevation or altitude",
  638.     utmptodescend, constutmptodescend, -1, 0, 9999)
  639. @deffn Table @code{mp-to-ascend} u t -> mp
  640. @end deffn
  641. @deffn Table @code{mp-to-descend} u t -> mp
  642. These tables are the mp cost to go from the min possible elevation
  643. to the max possible elevation in the world.
  644. This is interpolated and rounded down.
  645. @var{t} is the type of terrain being left.
  646. Defaults to @code{0}.
  647. @end deffn
  648.  
  649. @deffn Table @code{ablation} u1 u2 -> n%
  650. This table is the amount of the hit that gets passed through
  651. to the transport's occupants.
  652. Defaults to @code{100}.
  653. @end deffn
  654.  
  655. @deffn Table @code{stack-ablation} u1 u2 -> n%
  656. @end deffn
  657.  
  658. Add a way for elevation to screen out detonation effects.
  659.  
  660. Interleave visual effects with detonation.
  661.  
  662. Add screen and area flashes as types of movies.
  663.  
  664. --Backdrop
  665.  
  666. To decide about revolt, define:
  667. u_[indep_]revolt_chance .01n%
  668. uu_[indep_]surrender-chance .01n%
  669. uu_surrender_range n
  670.  
  671. Define a "process" object:
  672. (process <name>
  673.   (agents <unit-type(s)>)
  674.   (automated-rate n1)
  675.   (manual-rate n2) ; + acp to do?
  676.   (inputs <material-types>)
  677.   (outputs ...)
  678.   (catalysts ...)
  679.   (terrain-effects ...)
  680.   )
  681. Process agent units are optional.
  682. May want to add "tooling" of units to do a process.
  683.  
  684. Add a type of random event where a side or group of units can change
  685. to an active side all at once, reflects changing politics, requires
  686. maintenance of reserves, etc.
  687.  
  688. Run end-of-turn scorekeepers at end of turn 0 (right before first
  689. turn of game)?
  690.  
  691. Add a min-hp-to-recover that is like hp-to-repair, but applies to
  692. automatic hp recovery.
  693.  
  694. Add ut_people_supply that is amount of supply gotten by unit if people in
  695. cell are on the same side.
  696.  
  697. Express need for limited supply as "n turns of supply before starvation"?
  698. Can lead to tough decisions about starving rear areas for sake of major
  699. offensives, etc.
  700.  
  701. in-length > 0 + ability to transfer from terrain should mean that unit
  702. can get supply from cells other than own cell.  Use to get water from
  703. adjacent land in "voyages".
  704.  
  705. Should choose side to revolt to by counting
  706. number of units (of same type on each side?).
  707.  
  708. Siege surrender chance should be distinct from normal surrender chance.
  709.  
  710. Games should be able to define what size groups can be surrounded,
  711. by radius or number of units.  Default to 1 cell areas.
  712.  
  713. [need to identify motives for material demand, if type not needed
  714. for actual survival - dyes needed for "art" for example -
  715. might vary between sides/unit types?]
  716. [would need to define generic elasticity of demands,
  717. also the profit-seekingness of a population (vs conservatism, etc)]
  718. [need some notion of credit too?]
  719. [units can effectively forage at some distance, distinguish foraging
  720. from actual production]
  721. [price should go up as material is transported further and further,
  722. and across varying difficulty of terrain...]
  723. [note that as sides, players can't force cell economy but can
  724. encourage it]
  725. [perhaps allow a side to fix a price artificially, let everything
  726. else readjust around it?]
  727. Sides can specify their trading relationship with other sides,
  728. by specifying the ratio of tariff to supply [etc].
  729. [trade relationship is indep of general trust/friendliness]
  730. [some type of agreements might be intrinsically enforceable, such as
  731. exchanges between units that cannot attack or capture each other]
  732. [exchange of material needs to relax fullness rules or be done as
  733. a sort of prim, else might not be able to trade when full]
  734.  
  735. Do supply lines, display unit's supplier and maybe supply route.
  736. Is there an efficient way to handle this?
  737.  
  738. To do large elev ranges, use bit 14 to indicate which range,
  739. define a global that gives ratio of ranges.  Also need a descriptor
  740. for text generation.
  741.  
  742. Add possibility to see some/all of a side's units if one of them is captured.
  743.  
  744. Weather needs pressure, humidity, calculates new values of these
  745. and also has effects on visibility at multiple levels of atmosphere.
  746. Need to identify effect of each terrain type (and elevation) on each
  747. of these, also specify the rate at which changes occur.
  748. Effects on supply.
  749. Effect on vision, sensing in general.
  750. Each utype has preferred weather, gradual falloff in effectiveness.
  751. Add a generic "violence" value that summarizes wind/storm strength,
  752. relate to unit behavior.
  753. Use season to get avg temp, perhaps regulate motions as well.
  754. Impl via weather phenomena - overcast/clouds, rain/snow, storms/wind,
  755. temperature, humidity (compute value of phenomena, then compute phenomena's
  756. effect on units).
  757. Attrition increased by storms, also chance of accidents (for each accident
  758. type).
  759. Could make some types of terrain temporarily impassable.
  760. Display should show fronts, major storms.
  761. Impl sequence should be fixed weather (weather state), random weather,
  762. seasonal weather, calculated weather.
  763. Implies that player-visible/settable state layers should be implemented first.
  764.  
  765. Compute a daily temperature cycle based on number of daylight hours etc.
  766.  
  767. @deffn UnitTypeProperty @code{weather-vision-range} dist
  768. [should be a table so can't see a long ways off from within forest?]
  769. @end deffn
  770.  
  771. The primary effect of clouds is to make things harder to see.
  772.  
  773. @deffn UnitTypeProperty @code{vision-cloud-effect} xxx
  774. @end deffn
  775.  
  776. Be able to play back a recorded sequence of weather during a game.
  777.  
  778. Distinguish "ideal" material level from "max" level, let
  779. some percentage of material move towards comfortable areas.
  780.  
  781. Scorekeeper can forbid the saving and restoring of a game, use in
  782. nonsecure situations.
  783.  
  784. Add a scorekeeper that looks at side view to decide whether player has
  785. discovered something that is to be searched for.  Should be able to
  786. require finding a lost city, etc.
  787.  
  788. Add option to scorekeeper to run on success/failure of an action
  789. matching given parameters, plus option to run on occurrence of a specified
  790. events, otherwise scorekeeper runs at either beginning or end of turn.
  791. Matching includes side and unit.
  792.  
  793. Add formal notion of money as a type of material that is global to a side,
  794. has no physical repn.  Materials such as gold can have a monetary value.
  795. Sides can force exchange rates or let float.
  796.  
  797. Add a "plague" random event/process that randomly spreads and moves around,
  798. use for fires, plagues, floods, etc.
  799. Could track state/progress by material layer or a "severity" layer.
  800. Perhaps use coating terrain for this?
  801.  
  802. Add random cloud modification process, include random storm generation.
  803.  
  804. DEF_TM_TABLE("supply-move-rate", tm_supply_move_rate,
  805.     "",
  806.     tmsupplymove, consttmsupplymove, 0, 0, 0)
  807. @deffn Table @code{supply-move-rate} t m -> n
  808. This table says how much of material @var{m}
  809. can be moved through terrain @var{t}
  810. (cell, border, or connection) in each material transfer action.
  811. The actual limit is the minimum of all cells and borders
  812. along the supply route.
  813. A value of @var{-1} allows any quantity to go through.
  814. @end deffn
  815.  
  816. DEF_UM_TABLE("supply-interdiction", um_interdiction,
  817.     "",
  818.     uminterdiction, constuminterdiction, 0, 0, 9999)
  819. @deffn Table @code{supply-interdiction} u m -> n%
  820. This table is the reduction of supply due
  821. to the presence of an enemy unit of the
  822. given type on the supply line.
  823. A value of @code{100} means that the unit has no effect on supply movement,
  824. a value of @code{0} means that the supply line is completely cut.
  825. Defaults to @code{0}.
  826. @end deffn
  827.  
  828. DEF_UU_TABLE("spy-see-always-chance", uu_spy_see_always,
  829.     "",
  830.     uuspyseealways, constuuspyseealways, 0, 0, 100)
  831. @deffn Table @code{spy-see-always-chance} u1 u2 -> n%
  832. This table is the chance that if @var{u1}'s spies return information
  833. about a unit of type @var{u2}, then that unit will always be
  834. visible thereafter, as if it were @code{see-always}.
  835. The compromised unit and its side will not be aware that
  836. this has happened.
  837. Defaults to @code{0}.
  838. @end deffn
  839.  
  840. @deffn UnitTypeProperty @code{spot-movement} t/f
  841. If this property is @code{true},
  842. then the unit's chance to be seen by other sides will be
  843. tested each time the unit moves.
  844. @code{spot-action} implies @code{spot-movement}.
  845. Defaults to @code{true}.
  846. @end deffn
  847.  
  848. @deffn UnitTypeProperty @code{spot-combat} t/f
  849. If this property is @code{true},
  850. then the unit's chance to be seen by other sides will be
  851. tested each time the unit engages in combat.
  852. @code{spot-action} implies @code{spot-combat}.
  853. Defaults to @code{true}.
  854. @end deffn
  855.  
  856. @deffn Table @code{see-combat-chance} u1 u2 -> n%
  857. This table is the basic chance to see a unit of type @var{u1} when
  858. in combat with a unit of type @var{u2}.
  859. The location of @var{u1} must be covered by some unit on the viewing side.
  860. This is evaluated for each combat action within a turn.
  861. Defaults to @code{100}.
  862. @end deffn
  863.  
  864. --Plans and Tasks
  865.  
  866. Add to move task to distinguish between "move and enter" and "move in open".
  867.  
  868. In some circumstances (which?), allow plan-tweaking commands to
  869. create and fill in the plan for an incomplete unit.
  870.  
  871. Add an ability to store and act on dated future plans and goals.
  872. Need to be able to evaluate preconditions for plan, so can do only
  873. if makes sense.
  874.  
  875. Doctrine and unit plans should include rules about when units should
  876. attack automatically.  Should be careful or will lose units to foolish
  877. actions.
  878.  
  879. Attack tasks should go after damageable units,
  880. if less than perfect protection, damageable visible occupants.
  881.  
  882. Check on likely success of resupply task, if dubious, commit to forward
  883. motion.  Consult AI or human prefs?
  884.  
  885. Defense plan should identify what is defended, and what are the threats.
  886. If no threats, unit just tries to stay healthy.
  887. Defender's search for threats should cover a radius computed from
  888. defender's and ward's positions, areas covered by view, speed of threats
  889. (need to see bombers *before* they reach cities, can attack and retire
  890. before anybody can react).
  891. Threats can be recognized directly, or gotten from AI's list of threats.
  892. A unit is a threat if
  893. 1) it can capture or damage the ward
  894. 2) it can cut the ward off from supply or other defenders
  895. 3) it can hurt the defender
  896. To respond to a chosen threat, can 1) attack the threat, 2) interpose,
  897. 3) move the ward, either on own or by carrying.
  898.  
  899. Do better resupply algorithm.  Unit should decide what materials it
  900. needs, and in what time frame, picks ideal locations to get materials
  901. from, then if at one, waits or transfers supply in.
  902.  
  903. Do a large sideways move if all immediate directions are blocked.
  904. Only do once or twice before task fails.
  905.  
  906. "Intercept/defensive" plan directs units to patrol in an area, attacks any
  907. enemy unit (doctrine defines "enemy") that is of a type that can be
  908. attacked/harassed/blocked (ignore types that we can't do anything about!)
  909. Only some kinds of defensive units are interceptors, others are blockers
  910. or kept in reserve.  Blockers interpose rather than attack enemies,
  911. while reserves avoid contact until plan is changed.  Defn of "reserve"
  912. partly depends on attacker, so fighters intercept bombers but ignore
  913. battleships.
  914. Do as explicit decision in general defense plan.
  915.  
  916. Re-evaluate return if transport moving away too fast.
  917. Calc distance, record as task parameter, check on next
  918. execution of task.  Add AI hook to allow for making transport move
  919. slower or rendezvous with unit needing supplies.
  920. Could have a "home" unit that is preferred if in range, such as
  921. fighters assigned to carriers.  Don't return to transports that
  922. don't have any fuel, unless there is no other choice; check on
  923. each task execution. Special-case
  924. grounding of aircraft if no supply in a base vs starvation of troops
  925. if no food in a base.
  926.  
  927. Exploration plan should set recon vs invasion type, use to decide
  928. about visibility while exploring.  Recon should attempt to gather
  929. knowledge without being seen.
  930.  
  931. If can refuel along a route if chosen correctly, subdivide move task
  932. so as to stop at refuel points.
  933.  
  934. Define a plan type that tracks/shadows units while staying out of sight
  935. as much as possible.  Would have to keep unit within view range but outside
  936. of its view range (and any other coverage, should write something to see
  937. whether a given cell might be visible to enemy), but may have to get
  938. closer to avoid losing trackee.  If unit being tracked seems about to
  939. do some damage, engage instead of shadowing.  May sometimes want to
  940. move to block or slow down trackee's escape.
  941.  
  942. Need special scenarios to be able to test all plan types accurately,
  943. should set up similar tests for all major parts of planning and AI code,
  944. each should ensure that all the code bits actually get executed.
  945.  
  946. Plans that fail to decide what to do are a potential problem, should
  947. eventually be replaced, but not too often or else warn about replacement.
  948. Track total usages as well as per-turn usage.
  949. Each successive plan for a unit should have a distinct serial number,
  950. display when displaying plan.  (units never share plans)
  951.  
  952. All units should get a chance to replan after acp/mp calculated
  953. but before anybody moves.  Should be fast, since nobody can move
  954. while this is happening.
  955. (Interface should be more obvious about this, so less confusion
  956. about turn change.)
  957. Give human players a chance to review plans made by high-initiative units
  958. before irreversibly made (flag review-plans, shows plans of units that
  959. are selected).
  960.  
  961. What about a task to not just resupply but to prepare for a long trip?
  962. Stock enough to make a crossing, etc.
  963. Check when doing an approach task, may want to push a "fillup" task.
  964.  
  965. Add notion of "supporting" another unit to doctrine, then unit could wake
  966. up and get involved automatically if combat nearby.
  967. Should specify by type & distance, as well as particular unit.
  968.  
  969. Do general org chart mechanism, as combined plan/task/AI machinery (formal
  970. limits on action expressed as unit control properties/tables).
  971. Allow promoting any (or restricted type?) unit to be a commander, and
  972. assignment of units to commanders.
  973. Units can have orders to follow cmdr, cmdrs could have utype requisitions
  974. so production automatically goes to them.
  975. (Machine player could use this too.)
  976. Add a display to show how everything relates.
  977. Define a commander_decide_plan(cmdr, unit) or have cmdr make tasks directly?
  978. Each commander should have (or appoint) a deputy unit that will get its
  979. plan data if it dies.  If deputy dies, should work down through orgchart
  980. to find anyone, only giving up if entire group is gone.
  981. "Commander" plan is mod of other plan types, cmdr bit is for coordination.
  982. Cmdr plan includes an "ideal" mix of types to command.
  983. AI uses to set production, human gets told of cmdr unit's needs somehow.
  984.  
  985. If no AI or display on a side, what should units do?
  986. Will still have doctrine, attitudes, loyalties, so plenty to work from
  987. (include indepside in this but have no side-style coordination?)
  988. Can have and execute plans but no mechanism to change plans
  989. (i.e. can be read in but not altered thereafter - would need to flag?)
  990.  
  991. Should be able to set a "build rate" that is slower than "fast as possible",
  992. to avoid material depletion.  (i.e. use doctrine to set default rate of
  993. build actions, set actual rate in build task?)
  994. Define as amt of time to wait before starting build of next type (if the same).
  995.  
  996. Define a "meet" task where transport and occ (or whatever pair
  997. or group) converge on a mutually acceptable place.  Track progress,
  998. give up if not getting closer.
  999.  
  1000. If hit/capture task fails because target has disappeared, offensive plan
  1001. should search vicinity of target location for units of matching type.
  1002. (But might be better to let generic task planning take over instead.)
  1003.  
  1004. Goal to move to an area should be satisfied by moving to nearest spot,
  1005. instead of a random point inside.
  1006.  
  1007. Add an "engineering" plan type, with subtypes "make-access" and "block-access".
  1008. Engineering units build access routes
  1009. by adding/removing/modifying terrain, or by building units that serve
  1010. only as bridges.  Should be able to build multi-cell/unit chains in
  1011. difficult cases.  Examples: could bridge one blocking cell by a) building
  1012. a transport unit that ferries, or b) building two connections.  Could
  1013. bridge a single blocking border by building a connection or by removing
  1014. border.  Want to do this for any cell that is very expensive to cross.
  1015. To implement, plan should look for cheapest route assuming that blockage
  1016. has been negated, then build bridges for that route.
  1017. Engineers should also know how to build roads, do that if road movement
  1018. is much faster (such as doubled) than normal movement.
  1019.  
  1020. Possibly useful doctrine slots:    
  1021.     short tasklimit;        /* max length of task queues */
  1022.     int respectneutrality;    /* attack neutrals automatically? */
  1023.     int trustallies;        /* rely on allies for transport etc? */
  1024.     short moverandomness;
  1025.     int movestraight;        /* try to move in a straight line? */
  1026.     short backtrackinglimit;    /* how far backwards to look for route */
  1027.     int unitseveraskside;
  1028.     int usemachinestrategy;    /* like setting humanp */
  1029.     int wakeintransport;    /* be awake while in transport? */
  1030.     int avoidbadterrain;    /* avoid dangerous/unproductive terrain? */
  1031.     /* need something generic for event wakeup */
  1032.     int lowsupplyreturn;    /* return to base if supplies low? */
  1033.     short supplyspare;        /* how close to cut low supplies */
  1034.     int repairreturn;        /* return to base for repairs if damaged? */
  1035.     int lowammoretreat;        /* run away if ammo is low? */
  1036.     int lowammoreturn;        /* return to base if ammo is low? */
  1037.     short generosity;        /* how much supply to share with others */
  1038.     int expendable;        /* OK to risk destruction in combat? */
  1039.     short rearm;
  1040.     short repair;
  1041.     short resupply;
  1042.     short ifnearbycombat;
  1043.     short ifnearby[MAXUTYPES];    /* how to react to utype nearby */
  1044.     short aggressiveness;    /* general aggressiveness */
  1045.     short wakeupinterval;
  1046.     short replaninterval;    /* how often to recompute plans */
  1047.     short exploreimportance;    /* priority of exploration */
  1048.     int exploreedges;        /* explore by going around edges? */
  1049.     int buildalways;
  1050.     /* something for move order? */
  1051.     short maxsubordinates;    /* general limit on number of subords */
  1052.     short maxsubordtypes[MAXUTYPES];  /* per-type limit on subords */
  1053.       case K_TASK_LIMIT:
  1054.         side->tasklimit = numval;
  1055.         break;
  1056.       case K_RESPECT_NEUTRALITY:
  1057.         side->respectneutrality = numval;
  1058.         break;
  1059.       case K_AVOID_BAD_TERRAIN:
  1060.         doctrine->avoidbadterrain = numval;
  1061.         break;
  1062.       case K_REARM_PERCENT:
  1063.         doctrine->rearm= numval;
  1064.         break;
  1065.       case K_REPAIR_PERCENT:
  1066.         doctrine->repair = numval;
  1067.         break;
  1068.       case K_RESUPPLY_PERCENT:
  1069.         doctrine->resupply = numval;
  1070.         break;
  1071. DEF_KWD("task-limit", K_TASK_LIMIT, 1)
  1072.  
  1073. DEF_KWD("respect-neutrality", K_RESPECT_NEUTRALITY, 1)
  1074.  
  1075. DEF_KWD("avoid-bad-terrain", K_AVOID_BAD_TERRAIN, 0)
  1076.  
  1077. DEF_KWD("repair-at", K_REPAIR_PERCENT, 0)
  1078.  
  1079. DEF_KWD("resupply-at", K_RESUPPLY_PERCENT, 0)
  1080.  
  1081. DEF_KWD("rearm-at", K_REARM_PERCENT, 0)
  1082.  
  1083. --AI
  1084.  
  1085. Fix AI so that it obeys real-time limits, and so that if acting as
  1086. assistant, timeout isn't ended prematurely.
  1087.  
  1088. Fix where town doesn't decide to build - happens when AI is assistant to
  1089. display and town wakes up (enemy passing by) but doesn't already have a task.
  1090.  
  1091. Add ability to have future goals, ultimately be able to script much
  1092. behavior.
  1093.  
  1094. Neutral sides should be run by AI, but act only in self-defense,
  1095. other AIs should be aware of this.
  1096.  
  1097. Hit worth should be the general payoff of one-on-one combat.
  1098. First test if combat possible.
  1099. bhw = 0 means breakeven.
  1100. bhw > 0 means always advantageous, < 0 disadvantageous.
  1101. Should account for construction and fuel costs? (is "Strategic worth")
  1102. In practice, tactical needs will outweigh the risks involved in fighting
  1103. when bhw < 0.
  1104. Also account for ability to escape, so less risk?
  1105.  
  1106. Designer should be able to toggle flags for mplayer,
  1107. force reevaluation etc.
  1108.  
  1109. Need better weighting of hit prob vs death prob, also relate to goals,
  1110. so unit with low hit prob will still attack another unit if it can win
  1111. the game by doing so.  (implies we need to evaluate importance of goals,
  1112. nearness to achieving them)
  1113.  
  1114. Add a player slot that can be used to set explicit AI goals, would
  1115. take precedence over computed goals.
  1116.  
  1117. Get goals from a hash table instead of creating anew each time.
  1118. Parameters of goal will be read-only.
  1119. get_goal(type, p1, ...)
  1120. change_goal(goal, newtype, newp1, ...)
  1121.  
  1122. Resign if goals (as derived from scorekeepers) are provably unachievable.
  1123.  
  1124. Move generic unit analysis tables from mplayer.c to ai.c, so all AI types
  1125. can use if desired.  Define/describe as very generic calculations that
  1126. are useful convenience caches.  Add more, such as typical time to complete
  1127. a particular type of unit.
  1128.  
  1129. Write a stdplay.c that is only applicable if game is similar to standard
  1130. game (examine set of types, but still need to doublecheck numbers).
  1131.  
  1132. Define some sort of generic ai-to-interface display.
  1133.  
  1134. --Mplayer AI
  1135.  
  1136. If game win is to own a particular type of unit, then set goal to own
  1137. one.  If can build, then start building and defend builder.  If unit
  1138. known to exist (how?), set goals to find and to capture.  If unit is
  1139. mobile, or if might be carried by mobile unit, set up a search pattern,
  1140.  
  1141. If countries are large, don't assign all of own country to home front, use
  1142. radial or grid theaters instead.
  1143.  
  1144. To do patrolling/picketing, space units so that few or no holes in coverage.
  1145. In theater being covered, check view dates and send units to update oldest
  1146. information - should be closest unit or one assigned to cover.  Could therefore
  1147. have a patrolling unit that only moves very little since its view range covers
  1148. nearly entire assigned area.  Allowable age of views depends on what sort of
  1149. surveillance is avail, how many units are assigned.
  1150.  
  1151. Derive acceptable risks from goals - unit that is crucial to game should not
  1152. risk self, disposable types can be sacrificed.
  1153.  
  1154. Construction calculations should prefer multi-purpose units, but randomize if
  1155. values close together.  (Test by making game variants with ultra-powerful
  1156. units, should see mplayer shift to building all the time.)
  1157. Each goal should be characterized timewise, so mplayer can start builds and
  1158. have units ready when goal becomes relevant.
  1159.  
  1160. For each type of goal in game, decide which units help accomplish and how
  1161. well, which units support indirectly, etc.  Also classify by short/long term
  1162. value - short-term is 5-10 turns or 1/10 of game, long-term is length of game.
  1163.  
  1164. When exploring world,
  1165. use knowledge of country size to optimize search, by spacing out explorers,
  1166. not filling in details of terrain until later (is diff, low-priority goal,
  1167. maybe subsumed by patrolling).
  1168.  
  1169. Prefer to hit or capture transports, especially if easier way to bag
  1170. or destroy the occupants.
  1171.  
  1172. Keep a persistent layer of "sightings" (or linked list if can be short),
  1173. record into when nonempty cell in view array is about to be cleared
  1174. during a turn (need hook from vision code).  Date sightings, clear
  1175. periodically.
  1176.  
  1177. Need a way to estimate units hidden in transports, so can freak out
  1178. over approaching transports.
  1179.  
  1180. Compute desired number of depot types by calculating the spacing
  1181. between necessary to ensure that each can supply another.
  1182.  
  1183. If only one builder available, should "timeshare" it properly.
  1184. Plan should track what has been produced, reduce preferences more and
  1185. more of a type gets built.
  1186. Test with old-empire.
  1187.  
  1188. Add heuristics to try to build bases at key or useful locations.
  1189.  
  1190. If scorekeeper body says something about testing possession on a given
  1191. turn, then make occupation a goal from the start.
  1192. If occupation goal unsatisfied, assign units to occupy, give each
  1193. the same goal, should also attempt to clear the area.
  1194. If satisfied, assign unit to defend the area (need to write "how
  1195. to defend" code?), possibly patrol around if everything not always
  1196. visible.
  1197.  
  1198. Speed up theater searches with a for_all_theater_hexes(th, x, y),
  1199. that iterates between min/max x and y.
  1200.  
  1201. If contacted more than one side, choose a side to concentrate on
  1202. (closest most likely), act defensively against other sides (but
  1203. still take opportunities).  May need to change emphasis if another
  1204. side turns out to be most threatening (tell this by tracking apparent
  1205. success w.r.t. each side).
  1206.  
  1207. Shift from offensive to exploration if everybody disappears.
  1208. Track max # of enemy ever seen and on which turn(s).
  1209. Should be persistent in covering area near last spotting of units.
  1210.  
  1211. When a unit executes its plan, routines like find_target()
  1212. either get a value from AI or search around (implicit "nobrains" AI?).
  1213. (AI should have prioritized list of targets composed already and
  1214. sorted by theater and goal etc.)
  1215.  
  1216. If parts of world view not necessarily up-to-date, need to do pickets
  1217. or patrols to guarantee as much coverage as possible. (use view dates)
  1218.  
  1219. If moderate-to-high chance of capture by unit surround, put units in
  1220. lines and other formations that can't be surrounded easily.
  1221.  
  1222. A side should act primarily defensively if it satisfies a goal,
  1223. but the game is not over and another side could take away.
  1224.  
  1225. Guess at likely theater for contacts, carve out of existing theaters,
  1226. reassign/replan *all* units.
  1227.  
  1228. Track contacts with other sides on a per-theater basis.
  1229.  
  1230. Mplayer should compute which types are mostly likely to be in play
  1231. at present, and at future times.  Can look at initial setup, construction
  1232. times, etc, and ignore types that can't possibly appear.
  1233.  
  1234. Mplayer should attempt to compute numbers of units and material needed
  1235. to achieve a goal, to some level of confidence, then set "buildup" plans -
  1236. some units explore/patrol etc, then when buildup finished, should plan
  1237. large-scale attack, from several directions if possible.  Reserve units
  1238. should hang around transports, but not sit on them unless transport protected.
  1239.  
  1240. Use people sides to adjust theather boundaries sometimes. (how?)
  1241.  
  1242. If chance to surrender by siege > 5%, compute an ideal frontage, minimizes
  1243. chance of units getting isolated.
  1244.  
  1245. Could do formations by reshaping theaters.  Units mass on edge, don't go past
  1246. until mplayer directs an offensive.  If offensive successful, mplayer adds gains to
  1247. theater.
  1248.  
  1249. If returning to a moving transport, and transport destination is further away,
  1250. push a "wait" or "rendezvous" task onto transport's queue.
  1251. Rendezvous task should estimate time of expected rendezvous, fail only
  1252. if actual time is 1 1/2 longer than expected time.
  1253.  
  1254. Be able to change theater size and shape as the situation changes,
  1255. let theater develop to optimal size.  (Vague, any real examples?)
  1256.  
  1257. For each theater, distinguish
  1258. recent vs older sightings, with exponential backoff (1-2 turns ago,
  1259. 3-5, 6-10, 11-20, etc).
  1260.  
  1261. AI should have a chance_to_own_one_of_type(side, side2, u) that the side's
  1262. current estimate of the likelihood of the given side2 owning at least one
  1263. unit of the given type.
  1264.  
  1265. Need special code to know how to defend bridgeheads, recent captures,
  1266. etc.  Reduce theater size or focus on immediate vicinity.  Own units
  1267. in "enemy" theater (define) should be defended against the most
  1268. immediate threats.  Look around for threats or potential threats.
  1269. Assign best units to deal with threats.
  1270.  
  1271. Have machine player compute general dependency chains for its strategy.
  1272. For instance, "need miners to produce uranium from mountains
  1273. to build nukes to attack cities".
  1274. Should be "lazily" computed, as needed to achieve basic goals.
  1275. Strategy code works by calculating a plan that consists of steps
  1276. to reach the goals.  Plan is sufficiently detailed when side can
  1277. tell each unit what to do, or doctrine has the same effect.
  1278. Not always totally deterministic, how does this work?
  1279.  
  1280. Unit type analysis should be based on average outcome, plus worst/best-case
  1281. outcomes if not maybe not expecting enough action to let things average out.
  1282.  
  1283. To estimate materials, scan world, for each unit image, add survival
  1284. needs to min est, stockpile - avg operating costs to likely est,
  1285. total storage capacity to max est.  Can use actuals for own and allies.
  1286. Similar for terrain and population.
  1287.  
  1288. Unit first spotting human enemy should disappear as quickly
  1289. as possible, might escape before human notices. (exploratory plan only)
  1290. Purely exploratory/recon units should generally avoid combat, try to escape
  1291. and stay hidden if possible.
  1292.  
  1293. Theaters of < 6 cells should be removed entirely.  Find center of theater,
  1294. iterate around to a distance of 6 at most, change cell to another adjacent
  1295. theater.  Iterate through all theaters, repeat if any too-small theaters
  1296. left (might have two two-cell theaters adj, for instance).
  1297.  
  1298. To decide when to make bases, do if can create supply, can xfer from
  1299. further than units can, can protect units in or near base.
  1300.  
  1301. Do base construction as 1) moving to construction site, 2) building, and
  1302. 3) carrying to final site.  (Must verify that base or parts of base can
  1303. be carried.)
  1304.  
  1305. When exploring and switching theaters, shift both to inner and outer
  1306. theater (actually an abutting theater of any sort).
  1307.  
  1308. When enemy unit spotted in a zone, decide if unit is part of larger
  1309. group (like a country), what kinds of units might be present (similar,
  1310. sessile, etc).
  1311. If unit is isolated, decide if it is a threat in any way, if so, make
  1312. a goal "enemy gone from x,y" and assign units to work on this goal,
  1313. with types and numbers sufficient to the job.  Can borrow from nearby
  1314. theater if not too time-consuming.
  1315. If group, decide importance (home country being most important),
  1316. also assign # units, maybe make theater, track strengths, # units
  1317. enroute, and # still needed.
  1318. Distinguish units that are dangerous alone and ones that are carriers.
  1319. An army that is 2 cells away from capturing a self-unit should have
  1320. a maximal threat, since loss of game is certain if threat not counteracted.
  1321.  
  1322. Machine player should attempt to infer other sides' strategies.
  1323. side->strategy->other_side_analysis[nsides]
  1324. If no player on other side, record that other side will not do
  1325. anything (and go after to build territory).
  1326. If has a display, record as "more dangerous", use as a reason to
  1327. ally with other AIs in game.
  1328. Sides with displays should also be considered "more unpredictable".
  1329. If AIs ally, should be temporary, since game won't end even if all
  1330. are allied.
  1331.  
  1332. Define an "importance" of activities that gets divvied up among
  1333. subcommanders, so overall plans can be set aside temporarily while
  1334. individuals deal with immediate threats.
  1335.  
  1336. Mplayer code should look for "choke points" that are standard
  1337. routes between important places and around obstacles.  Calculate from
  1338. world and utypes, share among all machines (don't use if haven't seen
  1339. yet!).
  1340.  
  1341. Eventually add code to negotiate for neutrality/ally status.
  1342.  
  1343. Mplayer should prefer goals with fewest dependencies (prereqs) and
  1344. quickest time to completion.  Prereqs mean conditions that must be
  1345. true before main goal is worthwhile attempting, but are not formal
  1346. requirements - goals are intrinsically self-contained.
  1347.  
  1348. Scorekeeper analysis:
  1349. if keeping score
  1350.   make overall goal to win
  1351.   call make_subgoals
  1352. else amuse self by being random
  1353. if goal is to win
  1354.   for each scorekeeper
  1355.     if last-side-wins, ... (already done)
  1356.     else scan body looking for if's and do's
  1357.     (might be too complicated, should announce the fact as a warning
  1358.     "too complicated for me, don't know how to play" and drop
  1359.     back to simpler if mistaken goals) (or resign?)
  1360.     if body is "(if <test> win/lose)"
  1361.       make the satisfaction of the test a goal
  1362. if goal is to make a side lose
  1363.   if can be accomplished by eliminating a side's nonzero-value units,
  1364.   set goals to destroy/capture each type
  1365.   if not all visible, set goal to find units
  1366.     if type can move, goal is to keep info about world up-to-date;
  1367.       no random walking, always move to update oldest spots (but
  1368.       only in terrain where units could be)
  1369.     if type can't move, goal is to have examined all possible
  1370.       terrain.
  1371.  
  1372. In theater summary, don't print "people" if no people of any type are
  1373. present.
  1374.  
  1375. --Interface
  1376.  
  1377. Come up with a way for update_unit_display to not redraw cell until
  1378. all units in cell updated.
  1379.  
  1380. Add help node for instructions.
  1381.  
  1382. Interfaces should better declare when the game has been ended
  1383. arbitrarily (such as by running out of turns).
  1384.  
  1385. Change "move-to" long command to be just "move".
  1386.  
  1387. Allow typing prefix arg as prefix (or suffix ?) to long commands.
  1388.  
  1389. Add way for player to declare if AI is assisting by default, or in
  1390. charge by default.  AI decision about whether to end a turn should
  1391. also be controllable.  Similarly for resignation.
  1392.  
  1393. When turn finished in sequential, update all sides to remove progress
  1394. and action amount displays entirely, show only the active player's
  1395. progress.
  1396.  
  1397. Add idle-timeout, default to 60 secs.  If no player action, and all other
  1398. players finished turn, do a finish_turn.
  1399.  
  1400. Add some sort of generic "disembark into same cell" command.
  1401.  
  1402. Add a tabular form displaying side relationships (trust, willing to draw, etc).
  1403.  
  1404. Add a way to get explanations of action and task failures, needed to
  1405. explain non-functioning in game designs.
  1406.  
  1407. If gdl command is done, all help nodes should be invalidated.
  1408. Similarly for many internal arrays (bleah).
  1409.  
  1410. Distinguish two kinds of "go to next" consistently - unit that would normally
  1411. be queried about next (if current unit not moved so as to require scrolling),
  1412. ignore current unit until all others on side have moved.
  1413.  
  1414. Autoscrolling should always position so that each adjacent cell to a unit
  1415. also shows *entire* adjacent cells, all around.
  1416.  
  1417. Lists of units should also be able to display glimpses, just omit data
  1418. that is not available (what about names? might be tough to save names
  1419. with glimpses)
  1420.  
  1421. Need some sort of default grammar used when game designs don't want
  1422. to add anything special.
  1423. Copy ^0, ... concept for format strings generated by grammars.
  1424. Use grammar idea for narrative generation.
  1425. Do for actions, notable backdrop events, summaries.
  1426. (text disband-narrative
  1427.   (self infantry "%2 goes home")
  1428.   (u* bomb "%1 dismantles %2")
  1429.   )
  1430. Match on action args to choose sentence, allow multiple weighted choices
  1431. for variety, be able to tailor for each side.
  1432. Should be able to do both present and past tense generation.
  1433. Routine is describe_thing(side(s), generator, parms[10]).
  1434. (Would be generally useful to have a side-to-bit-vector conversion routine...)
  1435. "Narrative" different from "message", is past sense, while "message"
  1436. describes ongoing things.
  1437. Need to do narrative descriptions / events for notable backdrop events
  1438. such as migrations, storms, etc.
  1439.  
  1440. To choose contour interval for elevation display, get actual elev range
  1441. and subdivide into equal intervals, or define a "standard interval"
  1442. and multiply if would result in too many lines on map (> 1 line between
  1443. cell centers is too much).
  1444.  
  1445. Add an imf procedure to compute actual bbox of nonzero bits/mask in an image.
  1446.  
  1447. When drawing elevation changes, draw a gray line at cell edges to indicate
  1448. the "crease".
  1449.  
  1450. To indicate slope, draw center of cell with shape for next smaller mag,
  1451. then sloping rects joining adjacent edges of cells, then triangles around
  1452. each 3-way meet (for hexes anyway) to fill in holes.
  1453.  
  1454. Should not be able to appear to attack if attack not allowed
  1455. (arty in ww2-bn for example).
  1456.  
  1457. Add designer save option to write only some props of a unit, such as
  1458. position, and write as (unit <id> <props>), using name, number or id
  1459. as identifier.
  1460.  
  1461. Use generic names when summarizing types at a location or in a transport.
  1462.  
  1463. Add a side->ready_to_start that each player must enable before actual
  1464. game play starts.  Initially false for all sides, mplayer sets when
  1465. init done, interfaces enable at player's direction.  Could be button
  1466. or implicit when player tries to move.  Note that if multiple humans, and
  1467. one tries to move, move will not actually happen until everybody either
  1468. tries to move or else clicks on the start button.
  1469.  
  1470. When "view" of cell becomes an "exact view", do an update of it.
  1471. Redraw cells when coverage becomes zero, always replacing accurate
  1472. view with contents of view layer.
  1473.  
  1474. Interface should indicate a "move near" plan with a multiple lines
  1475. indicating radius, and circle around destination.
  1476.  
  1477. Direction cmds in dir of blocking terrain but adj to a slideable
  1478. border should cause a border slide. (also for move tasks?)
  1479.  
  1480. Linear terrain should be affected by night - draw half-black mask.
  1481.  
  1482. Command "ai" toggles between default aitype (first valid type in list
  1483. of types - generic mplayer should be first always?) and none, while "ai <name>"
  1484. switches to particular ai type.
  1485.  
  1486. Add ability to switch to alternate color/icon schemes, such as
  1487. winter camouflage for panzer, or military vs pictorial icons.
  1488.  
  1489. Add mechanism so that messages get echoed back, for confirmation
  1490. of contents mainly.
  1491.  
  1492. Fix interfaces so that only one base gets ordered to be built, but lots
  1493. of infantry from cities.  (in doctrine, feed to interface? - needs to
  1494. be part of default doctrine for all sides in a game!)
  1495. For standard, do
  1496. (side-defaults (doctrines (u* default-doctrine) ((* @) city-doctrine)))
  1497. (doctrine default-doctrine (construction-run (u* 1)))
  1498. (doctrine city-doctrine (construction-run (u* 99) (nuke 1)))
  1499.  
  1500. When displaying perspective, show top and bottom of "thick" terrain.
  1501.  
  1502. For textual commands, interpret <tab>, extend words, etc.
  1503.  
  1504. Detect image and image family conflicts/overrides when interpreting imf files,
  1505. warn about unless suppressed.
  1506.  
  1507. Handle some glimpses as special event types, such as spotting occupants
  1508. in a unit, instead of trying to draw on display somehow.
  1509. Call glimpse_unit(side, unit).
  1510.  
  1511. Don't say, for instance, "independent 2nd wreck" in textual displays,
  1512. but just "wreck" - both in topline displays and narratives.
  1513.  
  1514. A game design should be able to specify a per-side optimal centering
  1515. for the initial view.
  1516.  
  1517. Add some kind of sort key control to help info for commands.
  1518.  
  1519. Add more help nodes to explain general concepts like acp.
  1520. Describe each general concept that is enabled for the given
  1521. game, otherwise say "no xxx in this game".
  1522.  
  1523. Add table info to help nodes displayed by both first and second indices
  1524. (so for ut table, info is listed in a unit node and also in a terrain
  1525. node), plus add an additional node for the table alone.  Should table
  1526. help nodes be on a separate chain?
  1527.  
  1528. For synthesis method help node, add indication of whether each method
  1529. was actually run or not.
  1530.  
  1531. Add generic commands to go up and down; '-', '+'.
  1532. Arg specifies size of change, default is 1/2 of distance to lower/upper limit
  1533. on altitude.  Use long name command "alt <n>" to set altitude explicitly.
  1534.  
  1535. Allow definitions of images that constitute the border between two given
  1536. ttypes, or t1/t2/border combos, etc.  Store in global additional-images
  1537. or special-terrain-images
  1538. as list where each element is like (<ttype> (<ttype> <dirs...>) ... "image-name")
  1539. where first ttype is main cell type, succeeding indicate either linear
  1540. in given directions, or adjacent cells of given types in given directions.
  1541. image-name is the image or family name to use.
  1542. Example? (beach (terrain (ne sea) (half (n sea) (s beach)))
  1543.        (border (w nw) river)
  1544.        "beach&sea&river-1")
  1545.  
  1546. Add "angle" and "facing"  image properties that indicate approximate orientation and
  1547. direction being viewed from (side, top, 30 degrees, etc).
  1548.  
  1549. Add "dirmask" (or list of dirs) to images that may be used for linear
  1550. terrain.
  1551.  
  1552. Some images in imf may be precalced for a hex or other shape,
  1553. need to indicate specially.
  1554.  
  1555. (is sort of done now)
  1556. Allow adding a hole or mask to add side emblem to units (plus offset?).
  1557. Specify as (image ... (emblem-space x y w h) ...)
  1558. Also, each image can declare that an emblem is already embedded, as
  1559. ... (has-emblem <emblem-name>)... (would still draw actual emblem if
  1560. it didn't match the embedded one - leave embedded one, may be useful info)
  1561.  
  1562. Need keywords for images to tie less specific images at smaller
  1563. scales to more detailed ones - "su-85" -> "tank", etc.
  1564.  
  1565. Draw some features by using boundaries, of different appearances.
  1566.  
  1567. Need a way to indicate relative precedence of sort keys in list windows.
  1568.  
  1569. When in mono, allow choice of small numbers or letters for side, instead of
  1570. emblem.
  1571.  
  1572. At high mag powers (emblem width < 1/4 cell width), draw people emblems on each
  1573. border of hex next to hex with different people.
  1574.  
  1575. Define a -h <n> that sets up and waits to get pings from human players.
  1576. Like -e <n>.  Kernel only has "wait for <n> remote players", cmdline
  1577. does the -h part. -wait <mins> to say how long to wait before going
  1578. ahead, also allows players to get impatient and start anyway.
  1579. Ideally, the startup host gets a window or command interface
  1580. to control the startup process, see who is in, perhaps edit
  1581. display specs.
  1582. All player specs should be able to add "+n" to adjust advantages,
  1583. as in -e 4+2, +2 alone (one mplayer, +2 advantage?)
  1584.  
  1585. Players should be able to join above by doing "xconq -join host nnnn [-help]".
  1586. Help shows description of game and list of players/sides; say "(available)"
  1587. if side is waiting for a player, ask terminal for a side number to join in on.
  1588. Serving game must open a socket to listen.  If under X11, program can quit
  1589. once display is open; for others, program will continue to run.
  1590.  
  1591. Game should be able to spec relative or absolute widths of borders
  1592. and connections (used when solid or a pattern).
  1593.  
  1594. Should be able to, from cmdline, list available player slots in a remote
  1595. game without actually trying to get in.
  1596.  
  1597. Should be able to parse dates in commands,
  1598. omit parts that are same as current value (such as year).
  1599. Date string function should cache stuff, so not always allocing new
  1600. strings.
  1601. Length of a turn specified as "<n> <unit>" where <unit>
  1602. is known to calendar type.
  1603. Robustify the base date parsing.
  1604.  
  1605. Add a text parser etc for specifying units and types.  parse_[urt]type,
  1606. parse_unit should be able to recognize ambiguous matches, either return
  1607. # results or report of multiple, be able to process each independently,
  1608. put in dialog, etc.  parse_feature to locate geo geatures by name.
  1609.  
  1610. Kernel should deliver basic formatting info in help text, let interface
  1611. digest - need line breaks, text fill, tabs/tabstops, emphasis/bold (use
  1612. ^B,^P,^I chars?).  Perhaps some way to name a picture and let interface
  1613. fill in actual picture.
  1614.  
  1615. Do something in general for reporting destinations, choices are
  1616. raw coords, dir/dist, or a dest name of some sort (unit or region).
  1617. Useful to have optional map scale to report distances in miles etc?
  1618. Examples: "in xxx country" (needs defn of country)
  1619. (define gvar "start-area-name" that gives name?)
  1620. "NE of country" "E of Foo Bar" "in <region>"
  1621. Function is position_desc(buf, side, x, y), where side==NULL means
  1622. do for omniscient side,.
  1623. also define position_desc_relative(buf, side, x, y, x2, y2).
  1624.  
  1625. If info is always accurate and up-to-date, calculate display directly
  1626. from state.  If might be unknown at first, but always accurately
  1627. known once discovered, keep a bit/piece of info, display from state
  1628. if bit is on, else show nothing.  Similarly for info that might
  1629. get out of date if observer not present?
  1630. If info might be known/unknown and right or wrong, then must maintain
  1631. full copy, though can forward to real state if internally known to be
  1632. accurate.
  1633.  
  1634. Add imf property for additional info about an image. (explanation/derivation,
  1635. aimed more at game designers).
  1636.  
  1637. Add option to draw contour lines for elevations.
  1638. Contour intervals should be based on range of actual elevs, but let
  1639. player adjust (perhaps by looking at histogram of elevs).
  1640. Game design specifies color of contour lines.
  1641. Draw for each of six triangles P0P1P2 in a hex.
  1642. Pick two corners with elevs e0 and e1.
  1643. For each contour elev ec between e0 and e1
  1644.   If e2 > e1, no contours go to the e1e2 side
  1645.   If ec between e1, e2
  1646.     Draw line to e1e2 interpolation of ec
  1647.   If ec between e0, e2
  1648.     Draw line to e0e2 interpolation of ec
  1649. End
  1650. For each contour ec between e0 and e2
  1651.   If ec between e0,e1
  1652.     Draw line to e0e1 interpolation
  1653.  
  1654. Add designer tool to paint theaters for AIs.
  1655.  
  1656. In perspective view, displace units by both elevation of cell and their
  1657. altitude above it, maybe draw shadow on ground if airborne.
  1658. Center unit in cell better (?).
  1659. Shade slopes in perspective view according to time of day.
  1660.  
  1661. To support multiple natural languages, associate one of several languages
  1662. with each side, use to invoke nl-specific nlang.c/help.c routines.
  1663. Also have separate command definitions (de-cmd.def, fr-cmd.def, etc)
  1664. that interface should be able to use instead.  Each interface, if configured
  1665. for it, will have to set up all the command tables, so can be chosen
  1666. by each side at game startup.
  1667. Would need some sort of function vector setup so as to select the right
  1668. set of routines dynamically.
  1669.  
  1670. Add interface-independent printable display of all help info.
  1671.  
  1672. In printed map, make grid be gray, draw only around known-about terrain.
  1673. Draw area edge in light gray if adj cells not known terrain.
  1674. Use halftones or patterns instead of bitmaps possibly, add a
  1675. color -> grayscal translation process.
  1676. General cmd should be "print [window] [width]", where saying "window"
  1677. limits to contents of a window (else whole area is printed), and width
  1678. gives physical width of map, default is to fit on one page.
  1679. Each page should include a legend showing terrain, units, sides, use
  1680. up to four columns at bottom of page, run types together in columns to
  1681. save space. (Ditto for text/ascii view.)
  1682.  
  1683. Common printing code handles layout setup, layout checking, and actual
  1684. computation of printed view.  Interface handles any print setup dialog,
  1685. plus final disposal of printed view (to file, to print queue, etc).
  1686.  
  1687. All interfaces should have all printing methods available.
  1688.  
  1689. At end of a turn, display summary/histogram of action/task/plan types
  1690. and outcomes. (debugging display?)
  1691.  
  1692. Need a general (all-interface) strategy for guaranteeing image
  1693. consistency on screen.
  1694.  
  1695. Add ability to select direction of perspective view.
  1696. Easier if only one of NUMDIRS dirs allowed.
  1697.  
  1698. Clarify rules of how immobile units get on transports.
  1699.  
  1700. When autoscrolling, interfaces should support a brief delay option
  1701. so that players can see the outcome of a unit's last move for the turn.
  1702. Can omit if next unit is close by and no scrolling was needed.
  1703.  
  1704. Add ability to supply phrases for table row display in help:
  1705. "[can create] by default, [except for] base,town,city".
  1706. These would be optional non-null args to table display routines.
  1707.  
  1708. --Coding
  1709.  
  1710. Fix -DSYSV nonsense in SelFile so builds don't break.
  1711.  
  1712. Add sanity checks for layers, detect random hits into them by bugs
  1713. elsewhere in code.
  1714.  
  1715. In lisp.c, be smarter about ptrs to line numbers passed into reader,
  1716. do nothing if they're NULL.
  1717.  
  1718. Loop through vardefns[] to write out globals instead of including
  1719. gvar.def and expanding into separate code for each.
  1720.  
  1721. Include a configure option to add/remove PS printing code.
  1722.  
  1723. Put some/all info subwin text gen into ui.c or nlang.c, as appropriate.
  1724. unit_or_view_info(side, x, y, unit)
  1725. cell_info(side, x, y)
  1726.  
  1727. unit->side != indepside, always!  (how to check?)
  1728.  
  1729. Add a side->allow_entry[s][u1][u2] that says allowability of unit entry
  1730. into transports (use for indepside also).  Seed with 1 for all pairs
  1731. of types if side is trusted.
  1732.  
  1733. When recalculating coverage, detect discrepancies, warn about?
  1734.  
  1735. Write goals as separate forms, make xrefs to them.
  1736.  
  1737. Record the global state when becoming a designer, be able to write out
  1738. deltas only.
  1739. Be able to select only particular properties + unit id to write out.
  1740.  
  1741. Eliminate USE_CONSOLE from kernel, decide with a runtime flag.
  1742.  
  1743. unit_desig should format typename into minimum space, determined dynamically.
  1744. Assign chars, if defined, as shortest names, then add longer names to
  1745. uniquify names after the first using a particular char.
  1746.  
  1747. Allow multiple -L specs for libraries, support list of library dirs to search
  1748. for a module.
  1749.  
  1750. Collect/write stats on each call to run_game - # unit scanned, # acted,
  1751. # actions, # plan executions.  Also classify by type and side.
  1752.  
  1753. In initial game analysis, calc which utypes can be on which sides,
  1754. stash with side info.  For AIs, also stash guess about first turn
  1755. of appearance?
  1756.  
  1757. For each scorekeeper, add an internal flag that saves applicability
  1758. of scorekeeper, also calc for current turn - if changed, then AI
  1759. analysis code should re-run.
  1760.  
  1761. Write a search_straight_line(x0, y0, x1, y1, fn) that scans
  1762. exact line between places.  Could also do 3d version.
  1763.  
  1764. Be able to save individual properties along with ids to match with units.
  1765.  
  1766. Add option to save a map rotated, at least by 60-deg increments.
  1767. 60 left, 1st hextant formula is y' = x + y, x' = -y, etc.
  1768.  
  1769. When lots of mallocs being recorded, if full, increase vector by 50% and
  1770. copy old records over to new space.
  1771.  
  1772. Write dice specs as dice specs, not large numbers.
  1773.  
  1774. Use 16-bit indices to an array of pointers to units.
  1775.  
  1776. Add multi-player alerts;
  1777. multi_alert(msg, sides, [minquorum, mintopass], timeout)
  1778. multi_query
  1779. update_multi_query_display
  1780. interface calls ack_multi_query.
  1781.  
  1782. Define zz-s-u-n as cache for shortest name (down to 1 char if possible,
  1783. but confusing if only some have one-char names, others are all-but-one
  1784. char of name, etc)
  1785.  
  1786. Define a can_occupy(...,exclunit) that indicates room if given other
  1787. unit is *not* counted (since it will be removed shortly, for instance)
  1788.  
  1789. Make a bit vector of allowed sides for each type.
  1790.  
  1791. Define performance as a sort of ratio to specmarks, so benchmark game is
  1792. known to last 2 minutes on a 100-specmark machine, etc.  Use -R 1, only
  1793. "real" games, various mixes of AI, little/no interaction.
  1794. Games should include classic, standard, gettysburg, magnusvew, ww2-eur-42.
  1795.  
  1796. Doctrine consists of a list of modifications to a single doctrine object
  1797. that is final answer (no doctrine relationsships).  Can always clone a
  1798. doctrine but then is severed from original; add a routine to merge
  1799. matching doctrines together.
  1800.  
  1801. Add general check on parameter bounds as given in *.def.  Check while
  1802. reading values from forms into tables.
  1803.  
  1804. Define foo_text(buf, n, xxx) where n is available space for description,
  1805. return actual length of text in buffer.
  1806. To get strings, define foo_string(xxx), which returns a 0-terminated string.
  1807.  
  1808. For all units on a side, keep sorted by type, keep ptrs to start of each
  1809. type, use to index faster.  Could even maintain separate chains for each type.
  1810. Define a for_all_side_units_of_type(side,type,unitvar) iterator.
  1811.  
  1812. Implement a convex region finder that works by picking random points as seeds
  1813. and grows out from those.  Sides have to be "locked" if entire side can't
  1814. all grow - combo of locked and unlocked sides allows region to become
  1815. parallelogram, triangle, etc.
  1816. How should borders and connections affect generic region finding?
  1817. Grow from random points until about 3/4 of cells in regions, then scan
  1818. down to finish off.  (Could leave single points as "their own regions",
  1819. not alloc any region structs.)
  1820.  
  1821. General path objects consist of multiple segments, each with start/end
  1822. point and a validity test (that can be done at any time).  Also include
  1823. a bit with segment saying "shortest" or just "nonincreasing distance".
  1824. Should be possible for a path to say "impossible" for some segment??
  1825. (consider path that consists of land travel segments plus a sea hop
  1826. that needs a ferry of some sort - path is still valid and useful.)
  1827.  
  1828. Regions should
  1829. point to super-regions, not necessarily contained.  Include bits for
  1830. caching connectedness, terrain percentages, etc.  Add region layer to
  1831. regular map (each hex can only point to one region, multi-stuff must be
  1832. between regions).  Need commands to define and display regions.
  1833. Regions never overlap, must subdivide and make subregions be included
  1834. in several super-regions.  True for all regions, don't do multiple
  1835. "region layers" (unless significantly more efficient?  check stats).
  1836. Add region layer for mplayers that need to explore, add to layer
  1837. as mplayer sees stuff.
  1838.  
  1839. Theory of networked Xconq is that all copies synchronize on actions
  1840. and random seeds, then do run_game and get identical results.  Each
  1841. program will broadcast its planned actions, then wait until each other
  1842. program indicates that it has sent all that it plans to.  When a program
  1843. has received "done" from all others, then it can safely execute.
  1844.  
  1845. Allow various combinations of multiple- and single-server games.
  1846.  
  1847. For any routine in the interface that tweaks in the kernel, have to
  1848. siphon it off to the network also.  Do via compiling interface with
  1849. augmented calls, so kernel code need not be modified to know about
  1850. networking.  On receiving side, input mux includes a decoder that
  1851. invokes kernel routines (note that decoder has to know about calls
  1852. that not all interfaces actually support, since less-powerful
  1853. interface may get kernel-changing messages from more powerful interface).
  1854.  
  1855. Build a "skelclient" from skelconq.c and client.c.  client.c includes
  1856. a "wait_for_server" that calls run_game or just accepts outcomes and
  1857. state changes from the server.
  1858.  
  1859. Come up with a way to prove that mplayer doesn't cheat by looking
  1860. at structs?  Could have a have a "sneaker" that is always invisible,
  1861. never attacked unless mplayer cheats.
  1862.  
  1863. Add tests involving two communicating skelconqs with preset port
  1864. numbers, use to test networking behavior.  Use a skelconq and Xconq
  1865. on Macs to test PPC (or GUSI?)
  1866.  
  1867. Add a protocol version number etc so that mismatched versions can't
  1868. connect.
  1869.  
  1870. Further compress layers by including info about # bits (1,8,16).
  1871.  
  1872. Define a "text buffer" object that is variable-size, resizes as needed,
  1873. do all printfs into it.
  1874. To guarantee integrity, program could display checksum or signature to players
  1875. upon startup, so they can agree as to identity of program.
  1876.  
  1877. To do play-by-mail games, need to be able to save an optionally encrypted game
  1878. and pass along to next player -
  1879. player info includes some sort of bit indicating
  1880. where to send to. (player-address slot)
  1881. Encrypted game should retain game-module form as plaintext,
  1882. include a "password" slot, then all numbers appearing at "top level" will be
  1883. decrypted, random forms still read normally.
  1884. Also must be able to store all notices so other players can see.
  1885.  
  1886. Optimize mapping side and unit ids back to objects themselves.  Use hash
  1887. table for units, direct table for sides.
  1888.  
  1889. For tables, merge index1,index2 slots into one char(?) slot.
  1890. Make keyword value a char.
  1891. Set up table(type?)s in dynalloc space, sort for efficiency in search.
  1892.  
  1893. When saving elevations, always save as 0-based + addend values, doing
  1894. multiplier less important.
  1895.  
  1896. Use obstacks for building up help text.
  1897.  
  1898. Finish writing game compiler, test, collect speed comparisons.
  1899.  
  1900. Historical events should always be unique; check for duplications and
  1901. complain or avoid creating when restoring a game.
  1902.  
  1903. Restrict Lisp syntax knowledge to small part of code, allow translation
  1904. to other syntaxes (tcl?).
  1905.  
  1906. Keep part of history log on disk rather than in memory, read in to temp
  1907. (preallocated) space when saving game.
  1908.  
  1909. Add machinery to control size and detail of log, translate old stuff or
  1910. some event types into summaries rather than full records.
  1911.  
  1912. Kernel should be able to do a system reset - all data structures
  1913. and all allocation, so that a different game can be started up.
  1914.  
  1915. --Documentation
  1916.  
  1917. Filter zz-* out of manual, kwic index, etc.  (Move to hacking.texi?)
  1918.  
  1919. List or index commands both alphabetically and by general function.
  1920.  
  1921. Document that alternate versions of images are <name>-<n>, n >= 2,
  1922. and no need to worry about names that naturally have a -<n> at the end.
  1923. Main version should be "best" one.
  1924.  
  1925. Document change in meaning of consumption-per-build.
  1926.  
  1927. Add manual appendix of symbols that are sorted by class of symbol and then
  1928. symbol name.
  1929.  
  1930. Add a help node with properties of world (day/night for instance), install just
  1931. before unit type nodes.
  1932.  
  1933. Add html-ization for manual.
  1934.  
  1935. Describe parameters of actions.
  1936.  
  1937. In manual, describe each table as UUTable, etc.
  1938.  
  1939. Index concepts in manual, index in each chapter as appropriate, so can
  1940. trace player/designer/hacker views of concepts.
  1941.  
  1942. In hacking.texi, mention that all functions in cmd.def must be
  1943. implemented, even if only to complain.
  1944.  
  1945. --Testing
  1946.  
  1947. Add a compiletime option to measure compute time in microseconds for each
  1948. run_game().  Report each turn as histogram of times.
  1949.  
  1950. In symbol diff script, check symbols by class (type prop, table, etc)
  1951. against appropriate xxx.def file.  Implies no symbols used in both
  1952. xxx.def and keywords.def.
  1953.  
  1954. Add testing machinery for the graphical interfaces.
  1955. Could have AIs play each other on multiple screens.
  1956.  
  1957. Add a (quit [if-end]) command to skelconq that exits.  With if-end,
  1958. only exits if at end-of-game.
  1959.  
  1960. Instead of scanning lib dirs wholesale, make up a list of combinations
  1961. of game and variant options to run.
  1962.  
  1963. test-lib should run all the useful -g options (use game.dir to collect).
  1964.  
  1965. Add a script to discover which modules are never
  1966. loaded by any library game.
  1967.  
  1968. Set up basic "make check" to run only limited tests on library and standard
  1969. test cases.  Should finish in < 1 hour.
  1970.  
  1971. Add more directed tests as DejaGnu tests.
  1972.  
  1973. Finish adding test images to test.imf.
  1974.  
  1975. Add tests for end-of-game handling; win, loss, draw, etc.
  1976. Set up some lib games with non- or feeble sides, so one side wins
  1977. more quickly, plus heavily lopsided advantages.
  1978.  
  1979. To test save/restore of tables, dump out help info separately and
  1980. compare after restoration.
  1981. Also use compiler and compare its output.
  1982.  
  1983. Add a test of external synth program.
  1984.  
  1985. Run gdl/doc/all.g consistency tests as part of "make check-gdl".
  1986.  
  1987. --Library
  1988.  
  1989. Fix where ww2-bn games have two instead one turn of darkness.
  1990.  
  1991. Fix ww2-bn to not let ground units capture towns directly from
  1992. transports.
  1993.  
  1994. Add flag-dutch, flag-slovakia to flag images.
  1995.  
  1996. Set standards for names of library files:
  1997. case-insensitive, hyphen/underscore equiv, max of 11 chars for
  1998. name, 8 chars unique (algo - remove hyphens/underscores, then vowels),
  1999. 3 chars after dot.  Write a name analyzer/checker, DOS code should
  2000. do name reduction algo when trying to open a long name file.
  2001. game.dir -> game_dir.txt for DOS.
  2002.  
  2003. Establish standard image naming scheme:
  2004. [<game>-]<picture>[-<era>]
  2005. [<game>-]<function>[-<size>][-<era>][-<side/individual>]
  2006. Add to design.texi.
  2007.  
  2008. Recognize "color" images that are really just B/W, read/write as B/W.
  2009. (mac only??)
  2010.  
  2011. WWII scenario should be able to have a "neutrals" side that resists
  2012. involvement.  Attempts to attack neutrals should have some consequences.
  2013. Spain and Turkey should be neutral, but if attacked, will go over to
  2014. other side.  (This should be recorded in the scenario as a preset
  2015. property of those AIs!)  AIs on opposed sides should assess value
  2016. of capturing side's units vs expense & risk of combat.
  2017.  
  2018. For napoleon, make all cities visible, view all units once/month,
  2019. but don't be see-all.  Unit positions can be kept more up-to-date
  2020. by spies, or say that all units can spy out to 4-5 cells and all
  2021. cities are always spotted - so movements around and through are
  2022. always known about.
  2023.  
  2024. Add more 16x16 panzer images.
  2025. Eliminate slope terrain, replace with hilly or rough.
  2026.  
  2027. Gettysburg brigades should vary in quality and hp.
  2028. For Gettysburg, add movie showing rain descending on field at end of game.
  2029. Make unit display say "Kane's brigade (Fed)" instead of "your infantry Kane".
  2030.  
  2031. In pelops, try to model Athenian grain trade (abstractly or concretely?).
  2032. Add emblems for sides (owl for Athens at least).
  2033.  
  2034. Change stdunit so that only towns and cities count, not armies?  Will
  2035. require better defensive operations.
  2036.  
  2037. If fighters had a low land/takeoff time, then could attack adj bombers
  2038. a lot more than now (realistic), but bombers can't escape then, unless
  2039. some sort of generic auto-retreat implemented (a good idea).  Auto-retreat
  2040. might happen in addition to the hit, rather than instead of the hit.
  2041. Refuel should consume part of flying time, but not all, then can
  2042. fly many sorties against nearby targets.
  2043.  
  2044. Skelconq should examine lib.imf directly during setup, report
  2045. on which images were found for the game being loaded if debugging
  2046. on, warn if images not found.
  2047.  
  2048. Collect more old games, do partial translations (insects, alex).
  2049.  
  2050. Image tools should be able to study colors and colorized images
  2051. usefully somehow.
  2052.  
  2053. Let images refer to colors by name.
  2054.  
  2055. Make new world maps that use connections for straits and rivers.
  2056. Distinguish navigable/unnavigable rivers?
  2057. (extra layers should be optional - could do "ifdef river type")
  2058.  
  2059. Add notion of named palettes to .imf files, in form
  2060. (palette name color1 color2 ...)
  2061. then images can refer to palette by name and colors by index.
  2062.  
  2063. Modify standard game to be more resource-bound, supply used up
  2064. faster, all units must be kept supplied, need to build strings of
  2065. bases to get supplies out to where needed.
  2066.  
  2067. Write a ww2-std-pac-42 scenario with Allies (including Soviets?)
  2068. vs Japan.  Immediate post-Pearl.
  2069.  
  2070. Change ww2-div-pac to include diff sizes of ground units (reg, bde,
  2071. marine bn, inf-bn, marine-div).
  2072.  
  2073. In ww2-eur-42,
  2074. Swiss, Spain&Turkey should have option to be inaccessible, also remove any indep cities.
  2075. Sweden inaccessible?  Add 3-5 rows to top of map.
  2076. More US cities for balance, more depth to USSR (move existing cities west).
  2077.  
  2078. In ww2s-eur-42, add US cities so Allies outnumber Axis 4 : 3 or so, add Axis
  2079. town Oslo, Allied town Port Said.
  2080.  
  2081. WWII strategic games should have large number of predefined agreements
  2082. constraining players.  Add more pre-existing units to all sides.
  2083. Fleets should take longer to build?
  2084. Add "Axis/Allied minor" sides that include Balkans, etc.
  2085.  
  2086. Capturing city in advanced ww2 should cause immediate side change
  2087. in cell.
  2088. Add handling of oil as resource - inf needs little, armor needs lots,
  2089. but only to move.
  2090.  
  2091. Define emblems for axis and allied sides in ww2-stdunit.
  2092.  
  2093. For Normandy, set up staging areas for German reinforcements to arrive from.
  2094. Set German AI to be primarily defensive.
  2095.  
  2096. In flattop, gen names like "LC-1", "CA1", etc.
  2097. Allow stacking of ships - 4/cell.
  2098. Let subs be in same cell as enemy surface ships, let dd's attack there.
  2099.  
  2100. In tolkien/ring-quest, most types should be able to enter independents
  2101. without capturing.  Hobbits and elves should not be able to capture
  2102. anything, but dwarves could capture mines perhaps.  Should riders be
  2103. tied to Rohan specifically?
  2104.  
  2105. To get the AI to try to capture the ring specifically, define a
  2106. scorekeeper that tests possession, Mordor wins if possesses.
  2107. Alliance wins if ring no longer exists, can be destroyed by
  2108. dropping when on "lava" terrain (only at Mt Doom).
  2109.  
  2110. Add a game "Quest".
  2111. For one player usually, starts out as a vagabond with limited materials.
  2112. Either convert self to higher "rank", or else have improved capability
  2113. via experience points and more equipment (but what would "equipment" be
  2114. good for exactly?).
  2115. Can capture other humans, animals, etc, use as assistants of variable
  2116. loyalty.
  2117. Terrain is standard.  Include rivers and roads, with significant effects.
  2118. Units would be various cities/towns/villages, usual (wandering?) monsters.
  2119. Could have a machine-run side that seeks to capture/kill player, like a
  2120. police force or army (or assassins?).
  2121. Have ships for crossing oceans (but need to "buy" somehow, and if in town,
  2122. town should be on coast).
  2123. Include weather/seasons with significant effects.
  2124. Need unit/material as object of quest, perhaps different kinds for
  2125. different games.
  2126. (Need to be able to enter/leave neutral places without capturing, but also
  2127. be able to accept surrender - perhaps a notion of "if a place is indifferent
  2128. to your existence, can interact without combat".  Extend to hostile places
  2129. that you can sneak in and out of, though at some risk.)
  2130. Should predefine all sides(?), but allow multiple adventurers and only one
  2131. monster side - lock this side so players can't take it (but not always?)
  2132. To make a game of graduated difficulty, make a long horizontal world, put
  2133. player at one end, goal at other, lots of monsters in middle,
  2134. tougher ones further away.  (Monsters should move around a little,
  2135. but not overwhelm player instantly - could make "electric fences" of
  2136. ttypes crossable by player but not monsters, so even fast monsters confined.)
  2137. Would look like a string of sausages - 1600x40 world is approx equiv to
  2138. 40-level dungeon.
  2139. Won't be computed incrementally though, but could schedule creation
  2140. of high-level monsters to be later in game, make a snowball effect where player
  2141. faces huge numbers of monsters if too slow at first.
  2142. To make a race game out of this, make a star shape with players at end points
  2143. and goal in middle.
  2144.  
  2145. Add a game "Medieval Diplomacy" a la Kingmaker.
  2146. Each player is a lord/lady with coat of arms.
  2147. Few battles, much maneuvering.
  2148. More alliance machinery?
  2149. Need rules/state for varying degrees/types of alliance, could affect
  2150. mutual transport, control, temporary vs permanent gift, etc.
  2151. Can move armies around, raise/lower taxes, manage rebellions, wheel/deal.
  2152. Players have a chance of dying accidentally or of old age.
  2153. Can players be taken prisoner themselves and try to buy their freedom?
  2154. (Because if player is killed, possessions revert to neutral or to ally
  2155. rather than being acquired by capturer.)
  2156. (Need primitive for "exchange", theory is that actual individuals arranging
  2157. trade can prevent cheating on the spot, perhaps include a "chance of cheating
  2158. success" plus "attempt-to-cheat-p" that each player can set.)
  2159. (Be able to have "materials" like age or heat or poison that are deadly if you
  2160. accumulate too much? would need a excess-death-chance that is like starvation)
  2161.  
  2162. Add a game "Modern War".
  2163. Develop modern-day military games, both operational and strategic.
  2164.  
  2165. Add a game "Today".
  2166. An all-out simulation of the modern world at a 1/2 degree scale,
  2167. with each indep country as a side!  Use earth-50km map,
  2168. add cities and population to account for everybody.
  2169. Would need high-density cities, factories, etc.  Don't worry about size of
  2170. game, use it as a test of massive scale.
  2171.  
  2172. Add a game "Space Empires".
  2173. Like Spaceword HO or GB, based on thinly scattered solar systems with
  2174. planets as occupants, ships/cities occs of planets.  Deep space move
  2175. very slow (but not less than 1 hex/turn?), but could enter/leave gate
  2176. units more quickly if entry of non-adj unit allowed.
  2177. Solar systems are always-seen, but would need to explore planets more
  2178. carefully (planetary surfaces not plausible tho).
  2179. 1-month turns??
  2180.  
  2181. Add a game "Corporations".
  2182. [could make a game based on corporations that have units that are
  2183. factories etc, should be able to buy and sell them]
  2184.  
  2185. [most elaborate might be to allow corporations to coexist with
  2186. countries (what does that mean?)]
  2187.  
  2188. Finish the game "Mars".
  2189. Settlement of Mars, a la the Kim Stanley Robinson book "Red Mars".
  2190. Build underground and domed cities, develop mining etc, try to
  2191. control as much of Mars as possible if multiple players.
  2192.  
  2193. Add a more elaborate version of "Tolkien".
  2194. Alliance A is dwarves, elves, hobbits&Gandalf, Gondor&dunedain, Rohan,
  2195. each with own realms (Lorien, Iron Hills, etc),
  2196. Alliance B is Mordor, Isengard, Easterners, Southerners,
  2197. and indep sides are dragons, trolls, maybe balrogs.
  2198. Indeps should have predefined chaotic behavior.
  2199. Predefine most units, allow slow production of more.
  2200. Places include:
  2201. village (Hobbiton, Rivendell) - minimal production, no fortification
  2202. town (Edoras, Bree) - minimal fortification
  2203. city (Minas Tirith, Barad-Dur?) - has towers and walls, large population
  2204. tower (Isengard, Minas Morgul) - fortified place
  2205. mine
  2206. ruins - defensive advantage only
  2207. Types for Mordor should include orcs (group of 100?), wolves (group of 10?),
  2208. individual nazgul and trolls.
  2209. Hobbits are individuals, elves and dwarves are groups of 20, men & riders
  2210. are groups of 100.
  2211. Balrogs and dragons are individuals.
  2212.  
  2213. --Misc
  2214.  
  2215. Period converter should add a default favored-terrain = 0.
  2216.  
  2217. Implement Massimo's proposal for morale and feelings:
  2218.  
  2219. @section Morale and feelings
  2220.  
  2221. @subsection Notes
  2222.  
  2223. [@code{feelings} and @code{morale} should be kept orthogonal to
  2224. @code{cxp} and acp-debt.]
  2225.  
  2226. @code{feelings} (towards each side) are ``affinities''; they can be used
  2227. to implement ``loyalty'', ``fear'', etc.
  2228.  
  2229. @code{morale} is a sort of ``self-feeling''; it can implement
  2230. ``heroism'', ``honor'', etc.
  2231.  
  2232. @code{feelings} and @code{morale} can also be used to model ``magic
  2233. spells'', ``bribes'', ``leadership'', etc.
  2234.  
  2235. [remove @code{attitudes-max}, have a feeling towards each side.]
  2236.  
  2237. [I think that the following ``status'', ``effects'', and ``charm'' parts
  2238. are reasonable; the ``change'' parts are very cumbersome, but I couldn't
  2239. come out with something better.]
  2240.  
  2241. @subsection Status
  2242.  
  2243. @deffn UnitProperty @code{feelings} side-value-list@dots{}
  2244. The unit's true feelings towards each side,
  2245. including its own side.
  2246. Defaults to @code{0} for each side.
  2247. @end deffn
  2248.  
  2249. @deffn UnitProperty @code{morale} fp
  2250. The unit's true morale.
  2251. Defaults to @code{0}.
  2252. @end deffn
  2253.  
  2254. @deffn UnitTypeProperty @code{feeling-max} fp
  2255. Sets the range for @code{feelings} and @code{morale} from
  2256. @code{-feeling-max} to @code{+feeling-max}. 
  2257. Defaults to @code{0}, which disables @code{feelings} and @code{morale}.
  2258. @end deffn
  2259.  
  2260. @subsection Morale effects
  2261.  
  2262. All the following modifier add to the given quantity; they are
  2263. proportional to @code{morale} and are given at @code{feeling-max}
  2264. (i.e., they are multiplied by @code{morale}/@code{feeling-max} first).
  2265. They all default to @code{0}.
  2266.  
  2267. @deffn Table @code{surrender-chance-morale-modifier} u1 u2 -> n%
  2268. [use for sieges?]
  2269. @end deffn
  2270.  
  2271. @deffn Table @code{base-production-modifier} u m -> n
  2272. @end deffn
  2273.  
  2274. @deffn UnitTypeProperty @code{acp-per-turn-modifier} acp
  2275. @end deffn
  2276.  
  2277. @deffn UnitTypeProperty @code{disband-chance-modifier} n%
  2278. @end deffn
  2279.  
  2280. @code{disband-chance-modifier} requires of course the introduction of
  2281. @deffn UnitTypeProperty @code{disband-chance} n%
  2282. This is the chance for the unit to disband spontaneously.
  2283. Defaults to @code{0}.
  2284. @end deffn
  2285. Example: setting @code{disband-chance} to @code{0} and
  2286. @code{disband-chance-modifier} negative can model samurais: when morale
  2287. becomes negative (their honor is spoiled), they have a chance of
  2288. disbanding (with @code{disband-message} @code{"commits seppuku"}).
  2289.  
  2290. @subsection Feelings effects
  2291.  
  2292. All the following modifier add to the given quantity; they are
  2293. proportional to @code{feelings} towards the ``other unit's side'' (which
  2294. may often be the ``unit's own side'') and are given at @code{feeling-max}.
  2295. They all default to @code{0}.
  2296.  
  2297. @deffn Table @code{surrender-chance-feeling-modifier} u1 u2 -> n
  2298. [use for sieges?]
  2299. @end deffn
  2300.  
  2301. @deffn Table @code{capture-chance-modifier} u1 u2 -> n
  2302. @end deffn
  2303.  
  2304. @deffn Table @code{withdraw-chance-modifier} u1 u2 -> n
  2305. @end deffn
  2306.  
  2307. @deffn Table @code{control-chance-modifier} u1 u2 -> n
  2308. @end deffn
  2309.  
  2310. @deffn UnitTypeProperty @code{revolt-chance-modifier} n%
  2311. (proportional to @code{feelings} towards the ``unit's own side'').
  2312. @end deffn
  2313.  
  2314. @subsection Morale at creation
  2315.  
  2316. Builders may ``transfer'' their morale/feelings to created units.
  2317.  
  2318.  
  2319. @deffn Table @code{creation-feelings} u1 u2 -> n
  2320. Newly created units start with @code{feelings} equal to n/100 of
  2321. creator's @code{feelings}. Defaults to @code{0}.
  2322. @end deffn
  2323.  
  2324. @deffn Table @code{creation-morale} u1 u2 -> n
  2325. Newly created units start with @code{morale} equal to n/100 of creator's
  2326. @code{morale}. Defaults to @code{0}.
  2327. @end deffn
  2328.  
  2329. @subsection Morale changes
  2330.  
  2331. They all add to the unit's @code{morale}.
  2332. They all default to @code{0}.
  2333.  
  2334. @deffn Table @code{terrain-morale} u t -> fp
  2335. fp is added after each turn to the @code{morale} of u sitting in t.
  2336. Models (dis)-comfort of unit in given terrain.
  2337. @end deffn
  2338.  
  2339. @deffn UnitTypeProperty @code{acp-low-point} acp
  2340. @end deffn
  2341. @deffn UnitTypeProperty @code{acp-low-morale} fp
  2342. @end deffn
  2343. @deffn UnitTypeProperty @code{acp-high-point} acp
  2344. @end deffn
  2345. @deffn UnitTypeProperty @code{acp-high-morale} fp 
  2346. If u is left with less then @code{acp-low-point} acp at the end of a
  2347. turn, @code{acp-low-morale} is added to its @code{morale}.
  2348. If u is left with more then @code{acp-high-point} acp at the end of a
  2349. turn, @code{acp-high-morale} is added to its @code{morale}.
  2350.  
  2351. They model fatigue/rest effects.
  2352. @end deffn
  2353.  
  2354. @deffn Table @code{mp-low-point} u m -> mp
  2355. @end deffn
  2356. @deffn Table @code{mp-low-morale} u m -> fp
  2357. @end deffn
  2358. @deffn Table @code{mp-high-point} u m -> mp
  2359. @end deffn
  2360. @deffn Table @code{mp-high-morale} u m -> fp 
  2361. If u is left with less then @code{mp-low-point} of m at the end of a
  2362. turn, @code{mp-low-morale} is added to its @code{morale}.
  2363. If u is left with more then @code{mp-high-point} of m at the end of a
  2364. turn, @code{mp-high-morale} is added to its @code{morale}.
  2365.  
  2366. They model starvation/abundance effects. [use for sieges? m is
  2367. @code{"food"}]
  2368. @end deffn
  2369.  
  2370. @subsection Feelings changes
  2371. They all add to the unit's @code{feelings} towards the ``other unit's
  2372. side''.  They all default to @code{0}.
  2373.  
  2374. @deffn Table @code{transport-feelings} u1 u2 -> fp
  2375. fp is added after each turn to the @code{feelings} of u1, enjoing the
  2376. ride or the vacation in u2 (which can be a ``resort hotel'').
  2377. @end deffn
  2378.  
  2379. @deffn Table @code{material-transfer-feelings} u m -> fp
  2380. fp is added (for each mp transferred) to the @code{feelings} towards the
  2381. side transferring the material m to u.
  2382. Models pay, bribes ... (m is often @code{"gold"}).
  2383. @end deffn
  2384.  
  2385. @subsection Morale and feelings changes
  2386.  
  2387. They add to the unit's @code{morale}, to @code{feelings} towards the
  2388. ``unit's own side'', or to  @code{feelings} towards the ``other unit's
  2389. side'', according to their keyword.  They all default to @code{0}.
  2390.  
  2391.  
  2392. @deffn Table @code{win-morale} u1 u2 -> fp
  2393. @end deffn
  2394. @deffn Table @code{win-own-feeling} u1 u2 -> fp
  2395. @end deffn
  2396. @deffn Table @code{win-other-feeling} u1 u2 -> fp
  2397. They are applied when u1 destroys u2.
  2398. @end deffn
  2399.  
  2400. @deffn Table @code{hit-morale} u1 u2 -> fp
  2401. @end deffn
  2402. @deffn Table @code{hit-own-feeling} u1 u2 -> fp
  2403. @end deffn
  2404. @deffn Table @code{hit-other-feeling} u1 u2 -> fp
  2405. They are applied when u1 hits u2.
  2406. @end deffn
  2407.  
  2408. @deffn Table @code{wound-morale} u1 u2 -> fp
  2409. @end deffn
  2410. @deffn Table @code{wound-own-feeling} u1 u2 -> fp
  2411. @end deffn
  2412. @deffn Table @code{wound-other-feeling} u1 u2 -> fp
  2413. They are applied when u1 is hit by u2.
  2414. @end deffn
  2415.  
  2416. @deffn Table @code{see-enemy-morale} u1 u2 -> fp
  2417. @end deffn
  2418. @deffn Table @code{see-enemy-own-feeling} u1 u2 -> fp
  2419. @end deffn
  2420. @deffn Table @code{see-enemy-other-feeling} u1 u2 -> fp
  2421. They are applied when u1 sees a hostile unit of type u2.
  2422. @end deffn
  2423.  
  2424. @deffn Table @code{see-friend-morale} u1 u2 -> fp
  2425. @end deffn
  2426. @deffn Table @code{see-friend-own-feeling} u1 u2 -> fp
  2427. @end deffn
  2428. @deffn Table @code{see-friend-other-feeling} u1 u2 -> fp
  2429. They are applied when u1 sees a friendly unit of type u2.
  2430.  
  2431. @code{see-enemy} and @code{see-friend} can be used to implement
  2432. specialized morale/feeling (anti-)boosters: secret police, preachers,
  2433. leaders, dragons, nazguls...
  2434. @end deffn
  2435.  
  2436. @deffn Table @code{capture-morale} u1 u2 -> fp
  2437. @end deffn
  2438. @deffn Table @code{capture-own-feeling} u1 u2 -> fp
  2439. @end deffn
  2440. @deffn Table @code{capture-other-feeling} u1 u2 -> fp
  2441. They are applied when u1 is captured by u2.
  2442. @end deffn
  2443.  
  2444. @deffn UnitTypeProperty @code{change-side-morale} fp
  2445. @end deffn
  2446. @deffn UnitTypeProperty @code{change-side-own-feeling} fp 
  2447. @end deffn
  2448. @deffn UnitTypeProperty @code{change-side-other-feeling} fp
  2449. They are applied when u changes side (own is the ``old'' side, ``other''
  2450. the new side).
  2451. @end deffn
  2452.  
  2453. @deffn UnitTypeProperty @code{revolt-morale} fp
  2454. @end deffn
  2455. @deffn UnitTypeProperty @code{revolt-own-feeling} fp 
  2456. They are applied when u revolts.
  2457. @end deffn
  2458.  
  2459. @subsection Charm
  2460.  
  2461. This action can model magic spells, terrorism, psychological weapons,
  2462. propaganda, bribes, etc.
  2463.  
  2464. @deffn ActionType @code{charm} unit
  2465. This is the action that a unit performs to modify the @code{morale} and
  2466. @code{feelings} of another unit.  The unit must be visible and within
  2467. @code{charm-range} to be charmed. 
  2468. @end deffn
  2469.  
  2470. @deffn UnitTypeProperty @code{charm-range} dist 
  2471. Defaults to @code{1}.
  2472. @end deffn
  2473.  
  2474. @deffn Table @code{charm-friend-chance} u1 u2 -> n% 
  2475. The chance of charming a friendly unit.
  2476. Defaults to @code{0}.
  2477. @end deffn
  2478. @deffn Table @code{charm-enemy-chance} u1 u2 -> n%
  2479. The chance of charming a hostile unit.
  2480. Defaults to @code{0}.
  2481. @end deffn
  2482.  
  2483. @deffn Table @code{acp-to-charm} u1 u2 -> acp
  2484. This is the number of acp a unit uses to do one charm action.
  2485. Defaults to @code{1}.
  2486. @end deffn
  2487. @deffn Table @code{charm-consumption} u1 m -> mp
  2488. This is the amount
  2489. of u1's supply used up in one charm action.
  2490. m is usually something like @code{"mana"} or @code{"gold"}.
  2491. Defaults to @code{0}.
  2492. @end deffn
  2493.  
  2494. @deffn Table @code{charm-morale} u1 u2 -> fp
  2495. Added to u2's @code{morale} if charm is successful.
  2496. Defaults to @code{0}.
  2497. @end deffn
  2498. @deffn Table @code{charm-own-feeling} u1 u2 -> fp
  2499. Added to u2's @code{feelings} towards its side if charm is successful.
  2500. Defaults to @code{0}.
  2501. @end deffn
  2502. @deffn Table @code{charm-other-feeling} u1 u2 -> fp
  2503. Added to u2's @code{feelings} towards u1's side if charm is successful.
  2504. Defaults to @code{0}.
  2505. @end deffn
  2506.  
  2507. @subsection Relaxation
  2508.  
  2509. @deffn UnitTypeProperty @code{morale-relaxation} n
  2510. @end deffn
  2511. @deffn UnitTypeProperty @code{own-feelings-relaxation} n
  2512. (for the unit's own side)
  2513. @end deffn
  2514. @deffn UnitTypeProperty @code{other-feelings-relaxation} n 
  2515. (for all the other sides)
  2516.  
  2517. They default to @code{100}.
  2518. @end deffn
  2519.  
  2520. At the and of each turn, the old values of @code{feelings} and
  2521. @code{morale} are multiplied by (the appropriate) n/100; then all the
  2522. previous modifiers are added; the result is rounded to an integer in the
  2523. usual (stochastic) way to obtain the new @code{feelings} and
  2524. @code{morale}.
  2525.  
  2526. @subsection Missing
  2527.  
  2528. @code{revolt-chance} modifier for occupants (and nearby units).  Then,
  2529. using with @code{revolt-chance-modifier} and assuming that a
  2530. newly-captured unit retains a ``bad'' feeling towards the old enemy, you
  2531. will have to guard a newly-captured unit (with your ``secret police''?)
  2532. until its feeling towards you improves.
  2533.  
  2534. Effects of side behavior: d.o.w. or breaking a treatise should modify
  2535. feelings of (certain) units.
  2536.  
  2537. Effects of weather.
  2538. (end of proposal)
  2539.  
  2540. --X11 Interface
  2541.  
  2542. Show each player the options that were supplied at startup, as a notice.
  2543.  
  2544. Try run_game(3) instead of run_game(1).
  2545.  
  2546. Adjust timeout interval to be slower (200ms instead of 10ms)
  2547. if no actions were done by run_game.
  2548.  
  2549. To do movies, draw a frame and schedule a timeout to draw next frame.
  2550.  
  2551. Fix panner view pixmap to not cause crash if multiple displays open
  2552. (tmp hack was to disable if multiple displays).
  2553.  
  2554. In info window, use fixed fields of 4 chars for each supply type name.
  2555.  
  2556. Extend X11 selection of unit types to include multi-char names.
  2557.  
  2558. Fix X11 unit type list bitmaps to display with consistent colors.
  2559.  
  2560. SelFile should be configured out with disable-selfile, only built
  2561. and linked in if configured and present.
  2562. Fix SelFile nonportabilities like decl of sys_errlist, etc.
  2563.  
  2564. Make imf2x/x2imf translate bitmap filenames and struct names
  2565. properly.
  2566.  
  2567. Colorize unit icons via u_color().
  2568. Allow either use of side colors (symbolically, %1, %2, etc
  2569. matching against side color array elts, or by name).
  2570.  
  2571. List of unit types should gray out types that can't be owned by
  2572. the player.  Add option to eliminate any that can't be in game
  2573. at all (designer will need to see all types though).
  2574.  
  2575. Players should be able to indicate a willingness to declare a draw.
  2576. should display other sides' willingness to draw.
  2577.  
  2578. Use special bg pattern or stipple for unseen and grid colors if mono.
  2579. (or - support {lt,md,dk}gray on mono displays, in addition to other patterns.
  2580.  
  2581. Let imf2x only extract bitmaps whose names match given arg.
  2582.  
  2583. Add resource name to request_color, use to override standard
  2584. color choices in library.
  2585.  
  2586. Add resources:
  2587.     -xrm
  2588.     -display (for player starting the game)
  2589.     -fn, -font (text font only)
  2590.  
  2591. Use Xconq.game.<game>.<unit>.{char,image,color} to set per-game colors etc.
  2592.  
  2593. Add side->ui->default_draw_units etc to set initial values for each
  2594. created map, let these be settable from resources.
  2595.  
  2596. Fix drawing to not damage borders or else redraw as needed.
  2597. What rules for which should lay on top of which?
  2598. Try to optimize so border redrawing not always being done.
  2599.  
  2600. Default unit images should include first few chars of name in box,
  2601. a la Mac interface.
  2602.  
  2603. Allow setting of window subdivisions via resources.
  2604. xconq.mapListWidth: <pixels>
  2605. xconq.mapNotesHeight: <lines>
  2606.  
  2607. Develop a higher-contrast more-visible display of current unit/location.
  2608.  
  2609. Typing text into ask_position switches to prompt, reads a textual spec
  2610. of location.
  2611.  
  2612. Allow terrain color to be two colors, use to colorize mono bitmap
  2613. for terrain.
  2614. Search for ',' in t_color, fg first, then bg, assume bg is black if
  2615. not given.  Need a way to reverse so fg is black and bg colored.
  2616.  
  2617. imf2x should indicate progress, never overwrite existing images
  2618. (or compare - effectively "move-if-change" behavior)
  2619.  
  2620. Use a builtin color matching a color name if possible, otherwise
  2621. use the imc definition.
  2622.  
  2623. Write image scalers for *2 and /2 size images, compute and cache during
  2624. startup.  Shrink rule is 0,1 -> 0, 2,3,4 -> 1.
  2625.  
  2626. To describe movement abilities, display both acp and "move range over
  2627. a given terrain type", which may be much less.
  2628.  
  2629. Non-tiling terrain patterns should be centered in cell on top of another
  2630. pattern/color possibly.  How to scale to larger cells?
  2631.  
  2632. Never try to auto-calculate hex chars from fill patterns,
  2633. but maybe provide a simple tool, goes with tool to build
  2634. font from bitmaps?
  2635.  
  2636. Font should support terrain pattern inside colored hex - needs to be
  2637. precomputed when building the font.  If not avail, still have to draw
  2638. twice.
  2639.  
  2640. If names displayed on map, use different size (and type?) fonts
  2641. for different kinds of units.
  2642. Legend fonts should vary with magnification also.
  2643.  
  2644. What to do about area painting and dragging?  Turn on pointer motion
  2645. events temporarily?  Look at "bitmap" source.
  2646.  
  2647. Make the font stuff work again.
  2648. Define a family of "xconq" fonts, one (or two?) for each size, pack in
  2649. icons, masks, terrain.  Eventually allow more than one font at each size,
  2650. in case too many images.  Concentrate on terrain at first...  Keep separate
  2651. file with char->image mapping, read in from a standard place at startup.
  2652. (Install in program? No, can't update when font is updated)
  2653.  
  2654. For event list display, maintain buffer of n lines, each pointing to
  2655. event being listed, recalc when window enlarged, etc.
  2656. When list[i] selected, display event description plus ptrs
  2657. to related events.
  2658. Some "events" will be summaries (like total losses),
  2659. be able to change amt of summarization.
  2660. Observer mask is parenthetical remark.
  2661. Include toggles to display events as they come in, and
  2662. to scroll map to show where event is happening.
  2663.  
  2664. Change setup to use a single popup; list of games and preview at top,
  2665. then variants (min size initially, then grow for actual variants),
  2666. then player list and buttons.
  2667. Constrain to avail screen, borrow code from create_map.
  2668. Use cmdline to fill in as much as possible.
  2669. Highlight stage as committed to.
  2670. Confirm openability of each display when typed in.
  2671. Xconq.setup:
  2672. Xconq.setup.game:
  2673. Xconq.setup.game.list:
  2674. Xconq.setup.game.description:
  2675. Xconq.setup.game.picture:
  2676. Xconq.setup.game.loadbutton:
  2677. Xconq.setup.variants:
  2678. Xconq.setup.variants.{things}:
  2679. Xconq.setup.variants.ok:
  2680. Xconq.setup.variants.cancel:
  2681. Xconq.setup.players:
  2682. Xconq.setup.players.list:
  2683. Xconq.setup.players.{aibutton,etc}:
  2684. Xconq.setup.ok:
  2685. Xconq.setup.cancel:
  2686.  
  2687. --Macintosh Interface
  2688.  
  2689. Test that maps are properly cleaned up after when closed.
  2690.  
  2691. Detect when world size variant can no longer be used (after game
  2692. loading and revisit to variants dialog) and gray out.
  2693.  
  2694. Instructions menu item should go to instructions node of help
  2695. info instead of using a special window.
  2696.  
  2697. Gray out resign button if before game start. (?)
  2698.  
  2699. Add explicit test for cicn 256, warn if one exists.
  2700.  
  2701. Fix to beep if a unit ordered to attack but has no ammo available.
  2702. Should also pop up or otherwise make a warning visible.
  2703.  
  2704. Fix scrolling confusions in history window.
  2705.  
  2706. Fix scrolling confusions in list window.
  2707.  
  2708. Add option to display terrain as solid colors if colors are available.
  2709.  
  2710. Don't require resignation if quitting while a designer.
  2711.  
  2712. Define and use an "erase-in-the-grid" procedure.
  2713.  
  2714. Add a "completed units only" option to list view.
  2715.  
  2716. Display GPL somewhere at startup.
  2717.  
  2718. Don't force update or redraw of windows if clicking a button has no
  2719. visible effect (wrong mag for instance).
  2720.  
  2721. Don't redraw unchanged scores.
  2722.  
  2723. Ensure that "computer" and "face" icons updated when side info changes.
  2724.  
  2725. Interp arg to 'P' as number to build, seed from doctrine.
  2726. 'P' should bring up modal dialog?
  2727.  
  2728. In IMFApp, separate "color/mono" from "cqd available" display options.
  2729.  
  2730. In IMFApp, "Open..." should preselect imf.dir if exists.
  2731.  
  2732. In list, add column that indicates current task.
  2733.  
  2734. Disable "give" menu entirely if giving not allowed.
  2735.  
  2736. Attach version resources to all components of Mac binary distribution.
  2737. Do with MPW script that recurses through all files.
  2738.  
  2739. Change of map magnification should automatically set window to user state.
  2740.  
  2741. Choice to write statistics file should be preference, or else ask when game is over.
  2742.  
  2743. Display range of possible advantages in player dialog, allow setting via
  2744. popup or text box as well as up/down arrow.
  2745.  
  2746. Add numerical display option for sides, set up 8x8 or 6x8 number emblems.
  2747. Also allow larger sizes of numerals (12x12 or 9x12).
  2748.  
  2749. Save/restore window setup with Mac interface data, adjusting for
  2750. possibility that game is restarting on a different size screen.
  2751.  
  2752. Eliminate occasional need to click a second time to get a build to happen.
  2753. (Probably because unit hasn't come up in execution order yet.)
  2754.  
  2755. Add rubberbanding to world shape/size dialog.
  2756.  
  2757. Don't redraw all controls when updating designer dialog.
  2758.  
  2759. Support large numbers of sides in setup by adding a scroll bar between list of
  2760. sides and the buttons.
  2761.  
  2762. Draw side progress bars incrementally when possible.
  2763.  
  2764. Describe not-yet-arrived units correctly in list windows.
  2765.  
  2766. Check for events between every few rows of drawing, be able to abort or restart
  2767. drawing if requested.
  2768.  
  2769. Make designer palette into a floating window.
  2770.  
  2771. Do mouse-based actions when mouse *released*.
  2772.  
  2773. Use unit->uihook to optimize re-selection of units in maps.
  2774.  
  2775. Clicking in construction should cause next window back to scroll/hilite
  2776. selected unit (or add a button to do?)
  2777.  
  2778. Use drag of unit to indicate waypoints of a path, feedback with envelopes
  2779. of route and only do waypoints when indicating points outside shortest route.
  2780.  
  2781. Be able to double-click in build dialog to set construction .
  2782.  
  2783. When laying out list window, precompute widths of columns using max/expected
  2784. string widths for type names etc.  Account for width of headers and desired
  2785. spacing between columns.
  2786.  
  2787. Make pdoc load game and print the full description of it.
  2788.  
  2789. Allow multiple units to be selected in list windows.
  2790.  
  2791. Express merge by dragging onto unit, express detach by supplying an amount
  2792. in modal dialog (awkward, but rare?)
  2793.  
  2794. Should be able to zoom or resize side list to show relative standings and
  2795. other detail about each side.
  2796.  
  2797. Allow for more flexibility in size of emblem relative to unit (a preference?)
  2798.  
  2799. Display instructions and notes from multiple modules possibly, need to say
  2800. how to do this (explicit "append" directive at end of instructions?).
  2801.  
  2802. Implement a progress bar for internals of AI calcs or at least a watch cursor.
  2803.  
  2804. Extend construction dialog to include material production.
  2805.  
  2806. Build routines to insert a string into a "field" of a list entry,
  2807. instead of rebuilding entire entry.
  2808.  
  2809. Mark menus to indicate whether any of a group of selected units matches
  2810. each item.
  2811.  
  2812. Unhighlight forward/backward arrows when no units to look at.
  2813.  
  2814. Command-. should be able to interrupt nearly any calculation.
  2815.  
  2816. Preferences dialog should have a list of specific setups to choose from
  2817. ("big screen", "careful play", etc) impl as config-names.  Player config
  2818. objects should include Mac-specific flags then...  Dialog can also have
  2819. several screens of options.
  2820.  
  2821. To display names, make a layer of shorts where each value is location of
  2822. cell with the legended object.  Cell itself has access to legend, plus
  2823. flag indicating direction and position of beginning of legend.  Then to
  2824. erase legend, have to clear each cell that refers to given cell.
  2825. Also need to repair legend correctly when another unit passes through it.
  2826.  
  2827. When drawing rubberband line for movement, make line heavier for part of
  2828. movement that will happen immediately.
  2829.  
  2830. When listing units by location, add twist-down for occupants, group stack
  2831. members with bar or some such.
  2832.  
  2833. Be able to draw more unit info on map window, at least at high mag powers.
  2834. Do num parts/hp, mp/acp, in misc corners a la Empire Master.  Unit id would
  2835. be useful also sometimes.
  2836.  
  2837. Implement both randomly-chosen and cycling image sets for the map window.
  2838.  
  2839. Support multiple sounds - ones for attack, hit, death, use diff ones
  2840. for shooting, possibly movement noises.
  2841. Should be able to define special win/lose sounds (cheers and raspberries),
  2842. attach to interface's handling of events from kernel.
  2843.  
  2844. Implement images and sound effects for combat (at different scales, so
  2845. need to incorporate into imf machinery).
  2846.  
  2847. To indicate available movement, change cursor to reflect accessibility
  2848. and amount of time needed to get there (ETA) or display in control panel
  2849. or elsewhere on map.
  2850.  
  2851. Implement doctrine as dialogs examining doctrine objects.
  2852. Add button in unit closeups.
  2853.  
  2854. Do offscreen drawing for visible map plus part of area around, but need
  2855. to calc memory limits so as not to exhaust space prematurely.  Do one
  2856. offscreen area/map, precalc size and retain, use individual cell drawing
  2857. otherwise.
  2858.  
  2859. To draw maps while still allowing events, make an array of rows for each map.
  2860. Update event computes which rows to redraw, plus start/end of each (use 0/0
  2861. to indicate no drawing needed).   Then in main event-handling loop, if rows
  2862. remain to be drawn, do one or a few ("draw rows for 15 ticks") then go back
  2863. to wait for event.  Only call run_game when a) all map rows are drawn, or
  2864. b) an event comes in from another machine.
  2865.  
  2866. Be able to hit key to bring up useful data while rubberbanding, or else have
  2867. additional popup with this info.
  2868.  
  2869. Add localizations for common languages.
  2870.  
  2871. Support distinct images for individual units, via a hook property.
  2872. Maintain id->image table (hash table? do sizes as well).
  2873.  
  2874. Add a graph window that displays up to 4-5 chosen statistics against time.
  2875. Needs choice of what to display and a subset selector for each graph.
  2876. Some stats will have records that have been kept, others will start only
  2877. when graph is requested, but then keep accumulating even if no longer
  2878. being displayed.
  2879.  
  2880. Finish perspective display handling.
  2881.  
  2882. Add machinery (to MPW version) to build an integrated executable that
  2883. doesn't need lib or lib-mac.  Use sed/streamedit and Rez to make
  2884. resources from text files, plus renumber so no conflicts with
  2885. base resources.
  2886.  
  2887. Connect button on splash screen should bring up a transport selection a la Bolo,
  2888. with choices of serial, ip, atalk/ppc, and subdialogs appropriate for each.
  2889. Player setup dialog then needs a flag for each player to indicate when connected.
  2890.  
  2891. --Windows Interface
  2892.  
  2893. Add one.
  2894.  
  2895. --NextStep Interface
  2896.  
  2897. Add one.
  2898.  
  2899. --Curses Interface
  2900.  
  2901. By default, require manual "return" to advance by turns, if no other
  2902. opportunity arose during turn to enter commands, plus add a command
  2903. "<n> run" to free-run for up to n turns.
  2904.  
  2905. Fix curses interface cursor so not always in bottom corner of screen
  2906. on some machines (like sun4).
  2907.  
  2908. Fix where extra side is added to restored game because default
  2909. side/player is not being used.
  2910.  
  2911. Survey->move switch should keep curunit unchanged if occupant.
  2912.  
  2913. Check player specs for validity in curses context. (?)
  2914.  
  2915. Extend selection of unit types to include multi-char names.
  2916.  
  2917. Instead of scrolling to new screen, ask about units already visible,
  2918. skipping through others until time to scroll.
  2919.  
  2920. To describe movement abilities, display both mp and "move range over
  2921. a given terrain type", which may be much less.
  2922.  
  2923. When moving cursor modally, maintain some info about what exactly is under
  2924. the cursor (use whole info space, put info about what is being
  2925. moved in mode line).
  2926. Include info about distance from starting position, and support "direction"
  2927. cmds to cycle through stack.
  2928. Distinguish perm from temp top line data, keep track of each separately.
  2929.  
  2930. 'D' doctrine, have it bring up textual summary, use textual commands to
  2931. modify.
  2932.  
  2933. To tweak display, use long name command "show [+-][utn]" to enable/disable units,
  2934. terrain, names.
  2935.  
  2936. For event list display, maintain buffer of n lines, each pointing to
  2937. event being listed, recalc when window enlarged, etc.
  2938. When list[i] selected, display event description plus ptrs
  2939. to related events.
  2940. Some "events" will be summaries (like total losses),
  2941. be able to change amt of summarization.
  2942. Observer mask is parenthetical remark.
  2943. Include toggles to display events as they come in, and
  2944. to scroll map to show where event is happening.
  2945.  
  2946. Allow putting up a legend to display chars (such as terrain type chars)
  2947. in list area.  Bring up via '/' or perhaps option to general help.
  2948. (or via 'v' command?)
  2949.  
  2950. If can support, add getch() timeout so human can move immediately instead
  2951. of waiting for mplayer to finish.  Indicate that mplayer is "thinking"
  2952. periodically, need kernel callback (?).
  2953.  
  2954. Help topics should be formatted as multi-column list, let arrow keys
  2955. move around.
  2956.  
  2957. If a savefile is present and no contradictory args found (no -f, -g, -join),
  2958. ask the player if they wish to resume the saved game.
  2959.  
  2960. Ensure that all stdout/stderr stuff goes into a file so screen doesn't
  2961. get scrambled, even with debugging on. (copy Mac code)
  2962.  
  2963. Warnings should have a preference to record full text of warning in a file.
  2964. Full warning should more data at end of message, then truncate if too big
  2965. for alerts.  (If warning recording is on, mention in alerts or somewhere
  2966. that additional data is available in a given file.)
  2967.  
  2968. --DOS/VGA Interface
  2969.  
  2970. Add one.  (Xconq is fundamentally 32-bit code, so not much point in
  2971. trying to do anything less than i386 with VGA; in other words, use
  2972. DJGPP with libgrx.)
  2973.  
  2974.  
  2975.